Skip to content

Commit f930f8b

Browse files
committed
fix: .env 못 찾는 문제 수정
1 parent 8de6081 commit f930f8b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ WORKDIR /app
1313

1414
COPY --from=build /app/gdgoc/build/libs/app.jar app.jar
1515

16+
COPY gdgoc/.env .env
17+
1618
ENTRYPOINT ["java", "-jar", "app.jar"]

gdgoc/src/main/java/inha/gdgoc/config/ApplicationConfig.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
public class ApplicationConfig {
99
@Bean
1010
public Dotenv dotenv() {
11-
return Dotenv.load();
11+
return Dotenv.configure()
12+
.directory("/app")
13+
.ignoreIfMissing()
14+
.load();
1215
}
1316
}

0 commit comments

Comments
 (0)