-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (65 loc) · 1.83 KB
/
docker-compose.yml
File metadata and controls
70 lines (65 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: '3.8'
services:
# Frontend web application.
frontend:
build:
context: .
dockerfile: Dockerfile
container_name: sdc-web-frontend
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "80:80"
environment:
# Backend API URL - adjust based on your setup.
# For local testing with existing backend, use host.docker.internal.
# For docker-compose with backend service, use service name.
BACKEND_URL: ${BACKEND_URL:-http://host.docker.internal:8000}
networks:
- sdc-network
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
# Backend API (optional - uncomment if running full stack).
# backend:
# image: ghcr.io/dfmoller/sdc-backend:0.2.0
# container_name: sdc-backend
# ports:
# - "8000:8000"
# environment:
# - DB_HOST=postgresdb
# - DB_PORT=5432
# - DB_USER=postgres
# - DB_PASSWORD=password
# - DB_NAME=sdc
# # Alternatively, you can use DATABASE_URL for a full connection string:
# # - DATABASE_URL=postgresql://postgres:password@postgresdb:5432/sdc
# networks:
# - sdc-network
# depends_on:
# - db
# restart: unless-stopped
# Database (optional - uncomment if running full stack).
# db:
# image: timescale/timescaledb:latest-pg16
# container_name: sdc-db
# ports:
# - "5432:5432"
# environment:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: password
# POSTGRES_DB: sdc
# volumes:
# - postgres-data:/var/lib/postgresql/data
# networks:
# - sdc-network
# restart: unless-stopped
networks:
sdc-network:
driver: bridge
# volumes:
# postgres-data: