fix(deploy): pin distinct image tags per compose (booklib/{api,web}:{dev,prod}); same project name shared default tags so dev up without --build ran the prod image

This commit is contained in:
2026-09-07 21:24:33 +08:00
parent 95317a0108
commit 961de429f9
45 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -2,7 +2,8 @@
name: booklib
services:
web:
build: { context: .., dockerfile: web/Dockerfile.prod, target: runner }
image: booklib/web:prod
build: { context: .., dockerfile: frontend/Dockerfile.prod, target: runner }
ports: ["${WEB_PORT:-8080}:80"]
volumes:
- ./nginx/nginx.conf:/etc/booklib/nginx.conf:ro
@@ -10,6 +11,7 @@ services:
- ./logs/nginx:/var/log/nginx
depends_on: [api]
api:
image: booklib/api:prod
build: { context: .., dockerfile: backend/Dockerfile.prod, target: runner }
environment:
DATABASE_URL: postgres://lib:lib@postgres:5432/lib?sslmode=disable