-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
65 lines (59 loc) · 1.41 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
version: '3.3'
volumes:
postgres_data:
static_data:
media_data:
services:
postgresql_db:
image: postgres:13.0-alpine
container_name: snik_database
env_file: .env
volumes:
- postgres_data:/var/lib/postgresql/data
restart: always
backend:
build: ./backend
container_name: snik_backend
env_file: .env
volumes:
- static_data:/app/static
- media_data:/app/media
depends_on:
- postgresql_db
ports:
- 8080:8080
links:
- postgresql_db
restart: always
command: /bin/bash -c 'python3 manage.py makemigrations &&
python3 manage.py migrate &&
python3 manage.py collectstatic --noinput &&
gunicorn snik.wsgi:application --bind 0.0.0.0:8080 &&
stripe listen --forward-to 127.0.0.1:8000/payment/stripe-webhook'
redis:
image: redis:7.2-alpine
container_name: snik_redis
restart: unless-stopped
celery:
build: ./backend
container_name: snik_celery
env_file: .env
depends_on:
- redis
- postgresql_db
volumes:
- static_data:/app/static
restart: always
command: celery -A snik worker -l info --beat
nginx:
image: nginx:latest
container_name: snik_nginx
depends_on:
- backend
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- static_data:/app/static
- media_data:/app/media
ports:
- 80:80
restart: always