-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from Kookmin-Contest/prepare-to-change-this-re…
…pository-public 환경변수 주입으로 민감정보 가리기
- Loading branch information
Showing
88 changed files
with
639 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
MYSQL_DATABASE= | ||
MYSQL_USERNAME= | ||
MYSQL_PASSWORD= | ||
JWT_ACCESS_SECRET_KEY= | ||
JWT_REFRESH_SECRET_KEY= | ||
GOOGLE_CLIENT_ID= | ||
GOOGLE_CLIENT_SECRET= | ||
NAVER_CLIENT_ID= | ||
NAVER_CLIENT_SECRET= | ||
KAKAO_CLIENT_ID= | ||
KAKAO_CLIENT_SECRET= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
FROM openjdk:17-jdk-slim | ||
WORKDIR /app | ||
ARG JAR_FILE=build/libs/*.jar | ||
COPY $JAR_FILE ./app.jar | ||
ENTRYPOINT ["java", "-jar", "app.jar"] | ||
# syntax=docker/dockerfile:1 | ||
FROM eclipse-temurin:17-jdk-alpine AS build | ||
WORKDIR /workspace/app | ||
|
||
COPY . . | ||
|
||
RUN chmod +x ./gradlew | ||
RUN --mount=type=cache,target=/root/.gradle ./gradlew --no-daemon clean bootJar | ||
RUN mkdir -p build/dependency && (cd build/dependency; jar -xf ../libs/*-SNAPSHOT.jar) | ||
|
||
FROM eclipse-temurin:17-jdk-alpine | ||
VOLUME /tmp | ||
ARG DEPENDENCY=/workspace/app/build/dependency | ||
COPY --from=build ${DEPENDENCY}/BOOT-INF/lib /app/lib | ||
COPY --from=build ${DEPENDENCY}/META-INF /app/META-INF | ||
COPY --from=build ${DEPENDENCY}/BOOT-INF/classes /app | ||
|
||
COPY ./scripts/docker-spring-entrypoint.sh /scripts/docker-spring-entrypoint.sh | ||
RUN chmod +x /scripts/docker-spring-entrypoint.sh | ||
|
||
ENTRYPOINT ["java","-cp","app:app/lib/*","com.towork.api.ApiApplication"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ server { | |
listen 80; | ||
|
||
location / { | ||
proxy_pass http://api-server:8080; | ||
proxy_pass http://spring:8080; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# 로컬 실행 방법 | ||
# 오늘의 출근 Backend | ||
|
||
## 빌드 | ||
|
||
먼저 `.env.template`를 복사하여 `.env`를 생성한 뒤 환경변수를 적어 넣는다. | ||
|
||
```shell | ||
./gradlew bootJar | ||
docker-compose up --build -d | ||
``` | ||
gradlew를 이용하여 build하고 | ||
docker를 이용해 mysql, redis와 함께 서버를 올린다. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ENV_FILE=".env" | ||
|
||
if test -f "$ENV_FILE"; then | ||
export "$(grep -v '^#' .env | xargs -d '\n')" | ||
fi |
6 changes: 3 additions & 3 deletions
6
...com/backend/towork/ToworkApplication.java → ...n/java/com/towork/api/ApiApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package com.backend.towork; | ||
package com.towork.api; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing; | ||
|
||
@EnableJpaAuditing | ||
@SpringBootApplication | ||
public class ToworkApplication { | ||
public class ApiApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(ToworkApplication.class, args); | ||
SpringApplication.run(ApiApplication.class, args); | ||
} | ||
|
||
} |
16 changes: 8 additions & 8 deletions
16
...owork/auth/controller/AuthController.java → ...k/api/auth/controller/AuthController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...dto/request/DuplicateEmailRequestDto.java → ...dto/request/DuplicateEmailRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.