Skip to content

Commit

Permalink
Merge pull request #49 from dongkyun0713/dongkyun
Browse files Browse the repository at this point in the history
scripts ์ˆ˜์ •
  • Loading branch information
dongkyun0713 authored Feb 12, 2024
2 parents 468e227 + e2bccae commit d70483b
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 74 deletions.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

Binary file modified Titto_Backend/.DS_Store
Binary file not shown.
99 changes: 99 additions & 0 deletions Titto_Backend/nohup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
Error: -jar requires jar file specification
Usage: java [options] <mainclass> [args...]
(to execute a class)
or java [options] -jar <jarfile> [args...]
(to execute a jar file)
or java [options] -m <module>[/<mainclass>] [args...]
java [options] --module <module>[/<mainclass>] [args...]
(to execute the main class in a module)
or java [options] <sourcefile> [args]
(to execute a single source-file program)

Arguments following the main class, source file, -jar <jarfile>,
-m or --module <module>/<mainclass> are passed as the arguments to
main class.

where options include:

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
--class-path <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-p <module path>
--module-path <module path>...
A : separated list of directories, each directory
is a directory of modules.
--upgrade-module-path <module path>...
A : separated list of directories, each directory
is a directory of modules that replace upgradeable
modules in the runtime image
--add-modules <module name>[,<module name>...]
root modules to resolve in addition to the initial module.
<module name> can also be ALL-DEFAULT, ALL-SYSTEM,
ALL-MODULE-PATH.
--enable-native-access <module name>[,<module name>...]
modules that are permitted to perform restricted native operations.
<module name> can also be ALL-UNNAMED.
--list-modules
list observable modules and exit
-d <module name>
--describe-module <module name>
describe a module and exit
--dry-run create VM and load main class but do not execute main method.
The --dry-run option may be useful for validating the
command-line options such as the module system configuration.
--validate-modules
validate all modules and exit
The --validate-modules option may be useful for finding
conflicts and other errors with modules on the module path.
-D<name>=<value>
set a system property
-verbose:[class|module|gc|jni]
enable verbose output for the given subsystem
-version print product version to the error stream and exit
--version print product version to the output stream and exit
-showversion print product version to the error stream and continue
--show-version
print product version to the output stream and continue
--show-module-resolution
show module resolution output during startup
-? -h -help
print this help message to the error stream
--help print this help message to the output stream
-X print help on extra options to the error stream
--help-extra print help on extra options to the output stream
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:jdwp
see also -agentlib:jdwp=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
HiDPI scaled images are automatically supported and used
if available. The unscaled image filename, e.g. image.ext,
should always be passed as the argument to the -splash option.
The most appropriate scaled image provided will be picked up
automatically.
See the SplashScreen API documentation for more information
@argument files
one or more argument files containing options
-disable-@files
prevent further argument file expansion
--enable-preview
allow classes to depend on preview features of this release
To specify an argument for a long option, you can use --<name>=<value> or
--<name> <value>.

10 changes: 4 additions & 6 deletions Titto_Backend/scripts/start.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

PROJECT_ROOT="/home/ubuntu/app"
JAR_FILE="$PROJECT_ROOT/Titto_Backend/build/libs/Titto_Backend-0.0.1-SNAPSHOT.jar"
JAR_FILE="/home/ubuntu/Titto_Backend-0.0.1-SNAPSHOT.jar"

APP_LOG="$PROJECT_ROOT/application.log"
ERROR_LOG="$PROJECT_ROOT/error.log"
Expand All @@ -11,14 +11,12 @@ TIME_NOW=$(date +%c)

# build ํŒŒ์ผ ๋ณต์‚ฌ
echo "$TIME_NOW > $JAR_FILE ํŒŒ์ผ ๋ณต์‚ฌ" >> $DEPLOY_LOG
cp $PROJECT_ROOT/Titto_Backend/build/libs/Titto_Backend-0.0.1-SNAPSHOT.jar $JAR_FILE

# ๋””๋ ‰ํ† ๋ฆฌ ์ด๋™
cd $JAR_FILE
cp $PROJECT_ROOT/Titto_Backend/build/libs/*.jar /home/ubuntu

# jar ํŒŒ์ผ ์‹คํ–‰
echo "$TIME_NOW > $JAR_FILE ํŒŒ์ผ ์‹คํ–‰" >> $DEPLOY_LOG
nohup java -jar $JAR_FILE > $APP_LOG 2> $ERROR_LOG &
cd /home/ubuntu
nohup java -jar $JAR_FILE > /dev/null 2> /dev/null < /dev/null &

CURRENT_PID=$(pgrep -f $JAR_FILE)
echo "$TIME_NOW > ์‹คํ–‰๋œ ํ”„๋กœ์„ธ์Šค ์•„์ด๋”” $CURRENT_PID ์ž…๋‹ˆ๋‹ค." >> $DEPLOY_LOG
2 changes: 1 addition & 1 deletion Titto_Backend/scripts/stop.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

PROJECT_ROOT="/home/ubuntu/app"
JAR_FILE="$PROJECT_ROOT/Titto_Backend/build/libs/Titto_Backend-0.0.1-SNAPSHOT.jar"
JAR_FILE="/home/ubuntu/Titto_Backend-0.0.1-SNAPSHOT.jar"

DEPLOY_LOG="$PROJECT_ROOT/deploy.log"

Expand Down
23 changes: 0 additions & 23 deletions appspec.yml

This file was deleted.

24 changes: 0 additions & 24 deletions scripts/start.sh

This file was deleted.

19 changes: 0 additions & 19 deletions scripts/stop.sh

This file was deleted.

0 comments on commit d70483b

Please sign in to comment.