-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (77 loc) · 2.08 KB
/
docker-compose.yml
File metadata and controls
83 lines (77 loc) · 2.08 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
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: efdata-db
environment:
POSTGRES_DB: ${PSQL_DB:-efdata}
POSTGRES_USER: ${PSQL_USER:-efdata_user}
POSTGRES_PASSWORD: ${PSQL_PW:-changeme}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./src/econdata/sql:/docker-entrypoint-initdb.d:ro
ports:
- "5433:5432" # Using 5433 to avoid conflicts with local postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PSQL_USER:-efdata_user}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
efdata-app:
build: .
container_name: efdata-app
depends_on:
postgres:
condition: service_healthy
environment:
- PSQL_DB=${PSQL_DB:-efdata}
- PSQL_USER=${PSQL_USER:-efdata_user}
- PSQL_PW=${PSQL_PW:-changeme}
- PSQL_HOST=postgres
- PSQL_PORT=5432
- XR_API_KEY=${XR_API_KEY}
volumes:
- ./logs:/app/logs
- ./downloads:/app/downloads
ports:
- "8000:8000" # API port
restart: unless-stopped
command: python -m src.scheduler.spider_scheduler
efdata-api:
build: .
container_name: efdata-api
depends_on:
postgres:
condition: service_healthy
environment:
- PSQL_DB=${PSQL_DB:-efdata}
- PSQL_USER=${PSQL_USER:-efdata_user}
- PSQL_PW=${PSQL_PW:-changeme}
- PSQL_HOST=postgres
- PSQL_PORT=5432
ports:
- "8001:8001" # Using 8001 to avoid common conflicts
restart: unless-stopped
command: python -m frontend.api
# Optional: pgAdmin for database management
pgadmin:
image: dpage/pgadmin4:latest
container_name: efdata-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@efdata.local}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- "5050:80"
depends_on:
- postgres
restart: unless-stopped
profiles:
- debug
volumes:
postgres_data:
name: efdata_postgres_data
networks:
default:
name: efdata_network