From a4d625f16f48f2141a5c2afcff7f1e48c975c7ab Mon Sep 17 00:00:00 2001 From: YeongWoooo Date: Sat, 9 Dec 2023 21:32:07 +0900 Subject: [PATCH] =?UTF-8?q?[#94]=20env:=20dev=ED=99=98=EA=B2=BD=20?= =?UTF-8?q?=EB=B0=B0=ED=8F=AC=EB=A5=BC=20=EC=9C=84=ED=95=9C=20=EC=BB=A8?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=84=88=20=ED=8F=AC=ED=8A=B8=20=EC=9E=84?= =?UTF-8?q?=EC=8B=9C=20=EA=B0=9C=EB=B0=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 12 +++++++++--- main/Dockerfile | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index cc4e977d..29fe0ef4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,8 @@ services: swagger: image: swaggerapi/swagger-ui container_name: swagger + ports: + - 8080:8080 environment: - URLS= [ @@ -31,7 +33,7 @@ services: networks: - caddy labels: - caddy: localhost crew.api.dev.sopt.org www.crew.api.dev.sopt.org + caddy: localhost caddy.route: /docs* caddy.route.reverse_proxy: "{{ upstreams 8080 }}" @@ -40,6 +42,8 @@ services: context: ./main dockerfile: Dockerfile container_name: spring + ports: + - 4000:4000 environment: - SPRING_PROFILES_ACTIVE=dev restart: unless-stopped @@ -48,7 +52,7 @@ services: networks: - caddy labels: - caddy: localhost crew.api.dev.sopt.org www.crew.api.dev.sopt.org + caddy: localhost # for Swagger spec caddy.route_0: /api-docs/json caddy.route_0.reverse_proxy: "{{ upstreams 4000 }}" @@ -65,13 +69,15 @@ services: context: ./server dockerfile: Dockerfile container_name: nestjs + ports: + - 3000:3000 restart: unless-stopped environment: - NODE_ENV=dev networks: - caddy labels: - caddy: localhost crew.api.dev.sopt.org www.crew.api.dev.sopt.org + caddy: localhost # for Swagger spec caddy.route_0: /api-docs-json caddy.route_0.reverse_proxy: "{{ upstreams 3000 }}" diff --git a/main/Dockerfile b/main/Dockerfile index e1551553..d3754467 100644 --- a/main/Dockerfile +++ b/main/Dockerfile @@ -6,5 +6,5 @@ RUN ./gradlew build FROM openjdk:17-jdk-slim WORKDIR /app COPY --from=build /app/build/libs/*.jar app.jar -EXPOSE 8080 + ENTRYPOINT ["java","-jar","/app/app.jar"] \ No newline at end of file