diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..f38b07f4 --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..65ad297e --- /dev/null +++ b/docker-compose.yml @@ -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"]