update docker-compose.yaml

This commit is contained in:
xiabin 2025-02-27 09:03:40 +08:00
parent ae0fd91158
commit dff700f182
2 changed files with 12 additions and 13 deletions

View File

@ -1,6 +1,6 @@
dev: 打包镜像 & 在开发环境启动服务 admin: 打包镜像 & 在开发环境启动服务
on: [push] on: [ push ]
jobs: jobs:
build-services: build-services:
@ -25,14 +25,6 @@ jobs:
image: admin image: admin
steps: steps:
- uses: https://gitea.youtukeji.com.cn/actions/checkout@v4 - uses: https://gitea.youtukeji.com.cn/actions/checkout@v4
- uses: https://gitea.youtukeji.com.cn/actions/setup-go@v5
with:
go-version: '1.24.0'
- name: Verify Go version
run: go version
- name: Build Docker Image - name: Build Docker Image
run: docker build -t ${{ matrix.image }} -f ${{ matrix.dockerfile }} . run: docker build -t ${{ matrix.image }} -f ${{ matrix.dockerfile }} .
@ -41,14 +33,12 @@ jobs:
needs: build-services # 依赖构建阶段 needs: build-services # 依赖构建阶段
steps: steps:
- uses: https://gitea.youtukeji.com.cn/actions/checkout@v4 - uses: https://gitea.youtukeji.com.cn/actions/checkout@v4
- name: Start Docker Compose - name: Start Docker Compose
run: | run: |
docker-compose down --remove-orphans docker-compose down --remove-orphans
docker-compose up -d --build docker-compose up -d --build
env: env:
COMPOSE_PROJECT_NAME: youtu_grpc COMPOSE_PROJECT_NAME: youtu_grpc
steps:
- name: clean up - name: clean up
run: | run: |
docker rmi $(docker images -f "dangling=true" -q) docker rmi $(docker images -f "dangling=true" -q)

View File

@ -37,3 +37,12 @@ services:
TZ: Asia/Shanghai TZ: Asia/Shanghai
restart: always restart: always
network_mode: host network_mode: host
admin:
image: admin
container_name: admin
depends_on:
- ecpm
environment:
TZ: Asia/Shanghai
restart: always
network_mode: host