File tree Expand file tree Collapse file tree 5 files changed +31
-13
lines changed Expand file tree Collapse file tree 5 files changed +31
-13
lines changed Original file line number Diff line number Diff line change 4545 type=semver,pattern={{major}}
4646 type=edge,branch=main
4747
48+ - name : Extract metadata (tags, labels) for Docker (worker)
49+ id : meta_worker
50+ uses : docker/metadata-action@v5
51+ with :
52+ images : ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
53+ tags : |
54+ type=semver,pattern={{version}},suffix=-worker
55+ type=semver,pattern={{major}}.{{minor}},suffix=-worker
56+ type=semver,pattern={{major}},suffix=-worker
57+ type=edge,branch=main,suffix=-worker
58+
4859 # Build and push multi-arch prod image
4960 - name : Build and push prod Docker image (Multi-Arch)
5061 uses : docker/build-push-action@v6
5667 tags : ${{ steps.meta_prod.outputs.tags }}
5768 labels : ${{ steps.meta_prod.outputs.labels }}
5869 target : prod
70+
71+ # Build and push multi-arch worker image
72+ - name : Build and push worker Docker image (Multi-Arch)
73+ uses : docker/build-push-action@v6
74+ with :
75+ context : .
76+ file : ./Dockerfile
77+ push : true
78+ platforms : linux/amd64,linux/arm64/v8
79+ tags : ${{ steps.meta_worker.outputs.tags }}
80+ labels : ${{ steps.meta_worker.outputs.labels }}
81+ target : worker
Original file line number Diff line number Diff line change @@ -19,17 +19,18 @@ COPY api.py ./api.py
1919COPY ui.py ./ui.py
2020COPY conf/prompt_templates.yml ./conf/prompt_templates.yml
2121
22- # 暴露 Flask 和 Streamlit 的端口
23- EXPOSE 5001 5002
24-
2522# 使用 supervisord 作为启动命令
2623CMD ["/usr/bin/supervisord" , "-c" , "/etc/supervisor/conf.d/supervisord.conf" ]
2724
2825FROM base AS dev
2926COPY ./conf/supervisord.dev.conf /etc/supervisor/conf.d/supervisord.conf
27+ # 暴露 Flask 和 Streamlit 的端口
28+ EXPOSE 5001 5002
3029
3130FROM base AS prod
3231COPY ./conf/supervisord.prod.conf /etc/supervisor/conf.d/supervisord.conf
32+ # 暴露 Flask 和 Streamlit 的端口
33+ EXPOSE 5001 5002
3334
3435FROM base AS worker
3536COPY ./conf/supervisord.worker.conf /etc/supervisor/conf.d/supervisord.conf
Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ nodaemon=true
33user=root
44
55[program:worker]
6- #command=rq worker %(ENV_WORKER_QUEUE)s --url redis://redis:6379 --path /app
7- command=rq worker gitlab_yj_edusoho_cn --url redis://redis:6379 --path /app
6+ command=rq worker %(ENV_WORKER_QUEUE)s --url redis://redis:6379 --path /app
87autostart=true
98autorestart=true
109numprocs=1
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ services:
2424 context : .
2525 dockerfile : Dockerfile
2626 target : worker
27- # image: sunmh207/ai-codereview-gitlab:1.3.1-worker
27+ image : ghcr.io/ sunmh207/ai-codereview-gitlab:1.3.1-worker
2828 volumes_from :
2929 - app
3030 env_file :
@@ -42,7 +42,7 @@ services:
4242# context: .
4343# dockerfile: Dockerfile
4444# target: worker
45- # # image: sunmh207/ai-codereview-gitlab:1.3.1-worker
45+ # image: ghcr.io/ sunmh207/ai-codereview-gitlab:1.3.1-worker
4646# volumes_from:
4747# - app
4848# env_file:
@@ -57,8 +57,6 @@ services:
5757
5858 redis :
5959 image : redis:alpine
60- # ports:
61- # - "${REDIS_PORT}:6379"
6260 volumes :
6361 - redis_data:/data
6462 restart : unless-stopped
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ services:
1111 volumes :
1212 - ./biz:/app/biz
1313 - ./conf:/app/conf
14- - ./conf/supervisord.dev.conf:/etc/supervisor/conf.d/supervisord.conf
1514 - ./data:/app/data
1615 - ./log:/app/log
1716 - ./api.py:/app/api.py
@@ -29,7 +28,7 @@ services:
2928 context : .
3029 dockerfile : Dockerfile
3130 target : worker
32- # image: sunmh207/ai-codereview-gitlab:1.2.3 -worker
31+ image : ghcr.io/ sunmh207/ai-codereview-gitlab:1.3.1 -worker
3332 volumes_from :
3433 - app
3534 env_file :
@@ -41,8 +40,6 @@ services:
4140
4241 redis :
4342 image : redis:alpine
44- env_file :
45- - ./conf/.env
4643 ports :
4744 - " 6379:6379"
4845 volumes :
You can’t perform that action at this time.
0 commit comments