generated from GDGVIT/template
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yml
71 lines (62 loc) · 1.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
version: "3.7"
services:
backend:
container_name: backend
image: raysandeep/dscvit30daysofgcp
build:
context: .
dockerfile: Dockerfile
ports:
- 80:80
volumes:
- .:/usr/app
env_file: .env
depends_on:
- db
- redis
networks:
- internal
- web
redis:
container_name: redis
image: redis
restart: always
ports:
- 6379:6379
networks:
- internal
celery:
build: .
command: celery -A backend worker --loglevel=info --beat
env_file: .env
depends_on:
- db
- redis
networks:
- internal
db:
container_name: db
image: postgres:10.4
ports:
- 5432:5432
env_file: .env
networks:
- internal
deploy:
replicas: 1
restart_policy:
condition: any
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DATABASE: "defaultdb"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./dbdata:/var/lib/postgresql/data
volumes:
postgres_data:
networks:
web:
external: true
internal:
external: false