This commit is contained in:
Administrator
2024-05-10 10:46:11 +08:00
parent e9c00ea1d2
commit a2b10d1adb
2 changed files with 4 additions and 11 deletions

View File

@@ -8,9 +8,10 @@ build:
stage: build
script:
- mvn clean package
- sudo docker build -t library ./library
- sudo docker build -t gateway ./gateway
deploy:
stage: deploy
script:
- whoami
- sudo docker-compose up -d

View File

@@ -22,9 +22,7 @@ services:
library:
image: openjdk:8-jdk-alpine
volumes:
- ./library/target/library-0.0.1-SNAPSHOT.jar:/app/library-0.0.1-SNAPSHOT.jar
image: library
environment:
MYSQL_HOST: mysql
REDIS_HOST: redis
@@ -37,12 +35,10 @@ services:
- nacos
- mysql
- redis
command:
- java -jar /app/library-0.0.1-SNAPSHOT.jar
gateway:
image: openjdk:8-jdk-alpine
image: gateway
environment:
MYSQL_HOST: mysql
REDIS_HOST: redis
@@ -55,10 +51,6 @@ services:
- nacos
- mysql
- redis
volumes:
- ./gateway/target/gateway-1.0-SNAPSHOT.jar:/app/gateway-1.0-SNAPSHOT.jar
command:
- java -jar /app/gateway-1.0-SNAPSHOT.jar
networks: