Docker shit
This commit is contained in:
+46
-2
@@ -6,9 +6,53 @@ services:
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=tickets
|
||||
POSTGRES_PASSWORD: tickets
|
||||
POSTGRES_DB: system_data
|
||||
volumes:
|
||||
- pg_data:/var/lib/postregsql/pg_data
|
||||
- pg_data:/var/lib/postgresql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
# Full application (frontend + backend + nginx)
|
||||
# Usage: docker compose --profile full up --build
|
||||
app:
|
||||
profiles: ["full"]
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
container_name: ticketsystem
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8080:80
|
||||
environment:
|
||||
DATABASE_URL: postgres://postgres:tickets@postgres:5432/system_data
|
||||
TOKEN_SECRET: 160257c8c5ff2298363529e963a5901d2efa6d6ae67d634487c4d2bbc41c533f
|
||||
ORIGIN: http://localhost:8080
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
# Backend only (API server)
|
||||
# Usage: docker compose --profile backend up --build
|
||||
backend:
|
||||
profiles: ["backend"]
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile.backend
|
||||
container_name: ticketsystem-backend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8001:8001
|
||||
environment:
|
||||
DATABASE_URL: postgres://postgres:tickets@postgres:5432/system_data
|
||||
TOKEN_SECRET: 160257c8c5ff2298363529e963a5901d2efa6d6ae67d634487c4d2bbc41c533f
|
||||
ORIGIN: http://localhost:8000
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
|
||||
Reference in New Issue
Block a user