This repository has been archived by the owner on Jan 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
98 lines (92 loc) 路 2.31 KB
/
docker-compose.yml
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
version: "3"
services:
db:
hostname: db
image: postgres:15
container_name: fjob-db-prod
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${PG_NAME}
- POSTGRES_USER=${PG_USER}
- POSTGRES_PASSWORD=${PG_PASSWORD}
ports:
- "5432:5432"
env_file:
- .env
web:
hostname: web
build:
context: .
dockerfile: ./config/django/Dockerfile
container_name: fjob-web-prod
command: gunicorn fjob.wsgi --bind 0.0.0.0:8001
volumes:
- ./fjob:/app
ports:
- "8001:8001"
depends_on:
- db
- redis
- celery
environment:
- SECRET_KEY=${SECRET_KEY}
env_file:
- .env
nginx:
build:
context: .
dockerfile: ./config/nginx/Dockerfile
ports:
- "80:80"
container_name: fjob-nginx-prod
depends_on:
- web
- react
volumes:
- ./fjob:/app/
- ./config/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
redis:
image: redis:latest
container_name: fjob-redis-dev
ports:
- "6379:6379"
celery:
build:
context: .
dockerfile: ./config/django/Dockerfile
container_name: fjob-celery-prod
command: celery -A fjob.celery worker -l info
volumes:
- ./fjob:/app/
depends_on:
- db
- redis
environment:
- SECRET_KEY=${SECRET_KEY}
env_file:
- .env
celery_beat:
build:
context: .
dockerfile: ./config/django/Dockerfile
container_name: fjob-celery-beat-prod
command: celery -A fjob.celery beat -l info
volumes:
- ./fjob:/app/
depends_on:
- db
- redis
environment:
- SECRET_KEY=${SECRET_KEY}
env_file:
- .env
react:
build:
context: .
dockerfile: ./config/react/Dockerfile
ports:
- "4173:4173"
container_name: fjob-react-prod
depends_on:
- web