-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
101 lines (93 loc) · 2.16 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
99
100
101
version: '3.7'
services:
api:
image: depremmarket/api:latest
build: ./api
command: './wait-for.sh postgres:5432 -- ./wait-for.sh redis:6379 -- python manage.py runserver 0.0.0.0:8000'
volumes:
- ./api:/usr/src/depremmarket
- static_volume:/usr/src/depremmarket/staticfiles
- media_volume:/usr/src/depremmarket/media
env_file:
- ./.env
depends_on:
- postgres
- redis
networks:
- main
restart: on-failure
# celery_worker:
# build: ./api
# command: './wait-for.sh redis:6379 -- python manage.py celery'
# depends_on:
# - postgres
# - redis
# - api
# hostname: celery_worker
# entrypoint: '' # remove entrypoint of the backend
# volumes:
# - ./api/:/usr/src/depremmarket/
# - static_volume:/usr/src/depremmarket/staticfiles
# - media_volume:/usr/src/depremmarket/media
# env_file:
# - ./.env
# networks:
# - main
# restart: on-failure
postgres:
image: postgres:13.2-alpine
volumes:
- postgres_dev_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=depremmarket
- POSTGRES_PASSWORD=depremmarket
- POSTGRES_DB=depremmarket_dev
networks:
- main
restart: on-failure
redis:
image: redis:latest
command: redis-server --requirepass $REDIS_PASSWORD
ports:
- 6379:6379
volumes:
- redis_data:/data
networks:
- main
restart: on-failure
env_file: ./.env
# rabbitmq:
# hostname: rabbitmq
# image: rabbitmq:latest
# volumes:
# - rabbitmq_data
# networks:
# - main
# ports:
# - 5672:5672
# restart: on-failure
# logging:
# driver: none
nginx:
image: nginx:alpine
ports:
- 8000:80
# - 8000:443
volumes:
- static_volume:/staticfiles/
- media_volume:/media/
- ./nginx/dev.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl/:/etc/nginx/ssl/:ro
- ./nginx/html/:/etc/nginx/html/:ro
depends_on:
- api
networks:
- main
networks:
main:
volumes:
redis_data:
# rabbitmq_data:
postgres_dev_data:
static_volume:
media_volume: