-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (94 loc) · 2.32 KB
/
docker-compose.yml
File metadata and controls
100 lines (94 loc) · 2.32 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: pdforbit
POSTGRES_USER: pdforbit
POSTGRES_PASSWORD: pdforbit
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis-data:/data
api:
build:
context: ./backend
working_dir: /srv/backend
env_file:
- ./backend/.env
environment:
DATABASE_URL: postgresql+psycopg://pdforbit:pdforbit@postgres:5432/pdforbit
REDIS_URL: redis://redis:6379/0
FILES_ROOT: /srv/backend/var/pdforbit
CORS_ORIGINS: http://localhost:3000,http://127.0.0.1:3000
command:
- sh
- -c
- alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000
depends_on:
- postgres
- redis
ports:
- "8000:8000"
volumes:
- pdforbit-storage:/srv/backend/var/pdforbit
worker:
build:
context: ./backend
working_dir: /srv/backend
env_file:
- ./backend/.env
environment:
DATABASE_URL: postgresql+psycopg://pdforbit:pdforbit@postgres:5432/pdforbit
REDIS_URL: redis://redis:6379/0
FILES_ROOT: /srv/backend/var/pdforbit
command: ["python", "-m", "app.workers.rq_app"]
depends_on:
- postgres
- redis
- api
volumes:
- pdforbit-storage:/srv/backend/var/pdforbit
cleanup:
build:
context: ./backend
working_dir: /srv/backend
env_file:
- ./backend/.env
environment:
DATABASE_URL: postgresql+psycopg://pdforbit:pdforbit@postgres:5432/pdforbit
REDIS_URL: redis://redis:6379/0
FILES_ROOT: /srv/backend/var/pdforbit
command: ["python", "-m", "app.workers.cleanup"]
depends_on:
- postgres
- redis
- api
volumes:
- pdforbit-storage:/srv/backend/var/pdforbit
frontend:
image: node:20-alpine
working_dir: /app
environment:
NEXT_PUBLIC_API_BASE: http://localhost:8000
command:
- sh
- -c
- npm install && npm run dev -- --hostname 0.0.0.0 --port 3000
depends_on:
- api
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- frontend-node-modules:/app/node_modules
volumes:
postgres-data:
redis-data:
pdforbit-storage:
frontend-node-modules: