修正docker-compose

This commit is contained in:
liangzai 2024-10-02 02:27:36 +08:00
parent bf897b9743
commit 4f2b957598
2 changed files with 12 additions and 32 deletions

View File

@ -1,20 +0,0 @@
name: Deploy to Server
on:
push:
branches:
- main # 当推送到 main 分支时触发工作流
jobs:
deploy:
runs-on: RunnerLabel # 使用自托管的 Gitea Runner
steps:
- name: Checkout code
uses: actions/checkout@v2 # 从 Gitea 仓库中拉取代码
- name: Set up Docker
run: |
docker-compose down # 停止现有服务
docker-compose pull # 拉取最新镜像
docker-compose up -d # 启动服务

View File

@ -60,8 +60,8 @@ services:
# Gateway service
gateway:
build:
context: ./apps/gateway
dockerfile: Dockerfile
context: .
dockerfile: ./apps/gateway/Dockerfile
ports:
- "10001:10001"
environment:
@ -76,8 +76,8 @@ services:
# Admin service
admin:
build:
context: ./apps/admin
dockerfile: Dockerfile
context: .
dockerfile: ./apps/admin/Dockerfile
ports:
- "10002:10002"
environment:
@ -92,8 +92,8 @@ services:
# API service
api:
build:
context: ./apps/api
dockerfile: Dockerfile
context: .
dockerfile: ./apps/api/Dockerfile
ports:
- "10003:10003"
environment:
@ -110,8 +110,8 @@ services:
# MQS service
mqs:
build:
context: ./apps/mqs
dockerfile: Dockerfile
context: .
dockerfile: ./apps/mqs/Dockerfile
ports:
- "12001:12001"
environment:
@ -127,8 +127,8 @@ services:
# Sentinel service
sentinel:
build:
context: ./apps/sentinel
dockerfile: Dockerfile
context: .
dockerfile: ./apps/sentinel/Dockerfile
ports:
- "11002:11002"
environment:
@ -141,8 +141,8 @@ services:
# User service
user:
build:
context: ./apps/user
dockerfile: Dockerfile
context: .
dockerfile: ./apps/user/Dockerfile
ports:
- "11001:11001"
environment: