Skip to content

Commit

Permalink
refactor: prod file 경로 수정 및 도커 볼륨 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
choihuk committed Dec 14, 2023
1 parent dd29831 commit 054b62c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prod_cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
docker rm insurance_system_prod
docker rmi choihyeok/insurance_system_prod
docker pull choihyeok/insurance_system_prod
docker run -d -p 8080:8080 --name insurance_system_prod choihyeok/insurance_system_prod
docker run -d -p 8080:8080 -v file_volume:/app/files --name insurance_system_prod choihyeok/insurance_system_prod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ public class JavaFileService implements FileService{
private final String FILE_PATH;

public JavaFileService(@Value("${spring.profiles.active}") String activeProfile) {
if (activeProfile.equals("test")) {
if (activeProfile.equals("prod")) {
FILE_PATH = "/app/files/";
} else if (activeProfile.equals("test")) {
FILE_PATH = "/home/worker/files/";
} else {
FILE_PATH = System.getProperty("user.dir") + "/files/";
Expand Down

0 comments on commit 054b62c

Please sign in to comment.