Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (66 loc) · 1.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (66 loc) · 1.67 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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: smartoffice
POSTGRES_PASSWORD: smartoffice_dev_pass
POSTGRES_DB: smart_office
POSTGRES_INITDB_ARGS: "-c shared_buffers=256MB -c max_connections=200"
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U smartoffice -d smart_office"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://smartoffice:smartoffice_dev_pass@db:5432/smart_office
- ENVIRONMENT=development
- CORS_ORIGINS=*
depends_on:
db:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "python -c 'import socket; socket.create_connection((\"127.0.0.1\", 8000), timeout=2)'"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_URL: http://localhost:8000
VITE_WS_URL: ws://localhost:8000
ports:
- "5173:80"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
discord-bot:
build:
context: ./discord-bot
dockerfile: Dockerfile
env_file:
- ./discord-bot/.env
environment:
- API_BASE_URL=http://backend:8000
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
volumes:
postgres-data: