add docker

This commit is contained in:
2026-01-20 14:16:37 +07:00
parent 7afdfca230
commit e912928597
3 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
version: "3.9"
services:
redis:
image: redis:7
ports:
- "6379:6379"
mongodb:
image: mongo:7
command: ["--replSet", "rs0"]
ports:
- "27017:27017"
user-service:
build: ./user-service
depends_on:
- redis
- mongodb
giftcode-service:
build: ./giftcode-service
depends_on:
- redis
- mongodb

View File

@@ -0,0 +1,4 @@
FROM eclipse-temurin:21-jre
WORKDIR /app
COPY target/*.jar app.jar
ENTRYPOINT ["java","-jar","app.jar"]

4
user-service/Dockerfile Normal file
View File

@@ -0,0 +1,4 @@
FROM eclipse-temurin:21-jre
WORKDIR /app
COPY target/*.jar app.jar
ENTRYPOINT ["java","-jar","app.jar"]