Skip to content

Commit

Permalink
[feature/#313] Docker 관련 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
whitem4rk committed Jun 18, 2024
1 parent 7d82523 commit cff1e97
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM openjdk:11-jre-slim as spring

ARG JAR_FILE=./resource-server/build/libs/resource-server-0.0.1-SNAPSHOT.jar

EXPOSE 8080
EXPOSE 8081
EXPOSE 8082
EXPOSE 8083

COPY ${JAR_FILE} app.jar

CMD ["java","-jar", "app.jar"]
37 changes: 37 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: '3'
services:
prod1:
image: whtmdgus56/ibas-config:prod
container_name: backend/prod1
ports:
- "8080:8080"
environment:
- SPRING_PROFILES_ACTIVE=prod1
entrypoint: ["java", "-jar", "app.jar", "--spring.profiles.active=prod1"]

prod2:
image: whtmdgus56/ibas-config:prod
container_name: backend/prod2
ports:
- "8081:8081"
environment:
- SPRING_PROFILES_ACTIVE=prod2
entrypoint: ["java", "-jar", "app.jar", "--spring.profiles.active=prod2"]

dev1:
image: whtmdgus56/ibas-config:dev
container_name: backend/dev1
ports:
- "8082:8082"
environment:
- SPRING_PROFILES_ACTIVE=dev1
entrypoint: ["java", "-jar", "app.jar", "--spring.profiles.active=dev1"]

dev2:
image: whtmdgus56/ibas-config:dev
container_name: backend/dev2
ports:
- "8083:8083"
environment:
- SPRING_PROFILES_ACTIVE=dev2
entrypoint: ["java", "-jar", "app.jar", "--spring.profiles.active=dev2"]

0 comments on commit cff1e97

Please sign in to comment.