-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yaml
104 lines (95 loc) · 1.81 KB
/
docker-compose.yaml
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
101
102
103
104
version: "3.9"
services:
redis:
image: redis
restart: always
ports:
- "6379:6379"
networks:
- db_net
webapp:
restart: always
container_name: webapp
build: ./
volumes:
- ./:/app
- ./static:/app/static
- ./media:/app/media
env_file:
- ./.env
ports:
- "8000:8000"
command: bash entrypoint.sh
# command: >
# sh -c "python manage.py makemigrations &&
# python manage.py migrate
# && gunicorn easyoffer.wsgi:application --bind 0.0.0.0:8000"
depends_on:
- db
networks:
- db_net
worker:
restart: always
build: .
volumes:
- ./:/app
env_file:
- ./.env
depends_on:
- redis
- webapp
- db
command: 'celery -A easyoffer worker -l info'
networks:
- db_net
beat:
restart: always
build: .
volumes:
- ./:/app
depends_on:
- redis
- webapp
- worker
- db
command: 'celery -A easyoffer beat -l info'
networks:
- db_net
db:
image: postgres:15
container_name: postgre
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env
ports:
- 5432:5432
networks:
- db_net
nginx:
build: ./nginx
container_name: easyoffer_nginx
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./static:/static
- ./media:/media
- ./uploads:/uploads
- ./nginx/:/etc/nginx/conf.d/:ro
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
depends_on:
- webapp
networks:
- db_net
certbot:
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
volumes:
postgres_data:
networks:
db_net: