add prod and dev compose

This commit is contained in:
2026-08-02 05:09:00 +05:00
parent afb14038d9
commit 890b1aef34
8 changed files with 253 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
services:
database:
image: postgres:16
hostname: database
environment:
POSTGRES_DB: ${POSTGRES_DATABASE:-sarlink}
POSTGRES_USER: ${POSTGRES_USER:-sarlink}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
volumes:
- pgdata:/var/lib/postgresql/data
backend:
build:
context: ../../
dockerfile: .build/prod/api.Dockerfile
hostname: backend
image: git.shihaam.dev/sarlink/sarlinkportal/backend
env_file:
- ../../backend/.env
volumes:
- media:/app/media
depends_on:
- database
frontend:
build:
context: ../../
dockerfile: .build/prod/frontend.Dockerfile
hostname: frontend
image: git.shihaam.dev/sarlink/sarlinkportal/frontend
env_file:
- ../../frontend/.env
depends_on:
- backend
nginx:
build:
context: ../../
dockerfile: .build/prod/nginx.Dockerfile
hostname: nginx
image: git.shihaam.dev/sarlink/sarlinkportal/nginx
ports:
- "8080:80"
volumes:
- media:/app/media:ro
depends_on:
- frontend
- backend
volumes:
pgdata:
media: