Skip to content

Commit

Permalink
[#94] env: dev환경 배포를 위한 컨테이너 포트 임시 개방
Browse files Browse the repository at this point in the history
  • Loading branch information
rdd9223 committed Dec 9, 2023
1 parent 798b9e2 commit a4d625f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ services:
swagger:
image: swaggerapi/swagger-ui
container_name: swagger
ports:
- 8080:8080
environment:
- URLS=
[
Expand All @@ -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 }}"

Expand All @@ -40,6 +42,8 @@ services:
context: ./main
dockerfile: Dockerfile
container_name: spring
ports:
- 4000:4000
environment:
- SPRING_PROFILES_ACTIVE=dev
restart: unless-stopped
Expand All @@ -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 }}"
Expand All @@ -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 }}"
Expand Down
2 changes: 1 addition & 1 deletion main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit a4d625f

Please sign in to comment.