Fix some for docker

This commit is contained in:
M.Lotfi
2026-10-14 08:48:15 +03:30
parent d6d33d31c3
commit 3f033071f7
3 changed files with 16 additions and 6 deletions
+7 -5
View File
@@ -3,11 +3,17 @@
services:
db:
image: docker.arvancloud.ir/postgres:15-alpine
container_name: goldbank_db
# No container_name. Docker container names are global on the host, so a
# fixed name (goldbank_db) makes a second Dokploy app of this stack fail
# with "container name already in use". Compose names each container from
# the project name, which Dokploy sets uniquely per application.
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-goldbank}
# Host port only. The apps use hostname "db" inside the compose network.
# Two copies on one machine must publish different host ports; set
# EXTERNAL_DB_PORT on the second Dokploy app (5432 stays the local default).
ports:
- "${EXTERNAL_DB_PORT:-5432}:5432"
volumes:
@@ -23,7 +29,6 @@ services:
build:
context: ./apps/api
dockerfile: Dockerfile
container_name: goldbank_api
# Prisma connects on module init, so a not-yet-ready DB crash-loops the API.
depends_on:
db:
@@ -110,7 +115,6 @@ services:
build:
context: ./apps/admin-panel
dockerfile: Dockerfile
container_name: goldbank_admin_panel
# No host ports — Dokploy/Traefik routes by domain to container port 80
expose:
- "80"
@@ -122,7 +126,6 @@ services:
build:
context: ./apps/user-app
dockerfile: Dockerfile
container_name: goldbank_user_app
# No host ports — Dokploy/Traefik routes by domain to container port 80
expose:
- "80"
@@ -135,7 +138,6 @@ services:
build:
context: ./apps/user-app-v2
dockerfile: Dockerfile
container_name: goldbank_user_app_v2
expose:
- "80"
restart: unless-stopped