-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
116 lines (111 loc) · 2.52 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
services:
nginx:
container_name: 'nginx'
build:
context: ./docker/nginx
dockerfile: Dockerfile
networks:
django_net:
ipv4_address: 172.38.10.10
tty: true
ports:
- 8080:80
- 443:443
environment:
- NGINX_HOST=localhost
- NGINX_PORT=80
volumes:
- ./django/public/:/public/
depends_on:
- django
redis:
container_name: 'redis'
build:
context: ./docker/redis
dockerfile: Dockerfile
#restart: always
tty: true
networks:
redis_net:
ipv4_address: 172.38.30.30
ports:
- 6379:6379
- 6380:6380
environment:
- REDIS_PASSOWRD=$REDIS_PASSOWRD
command: /bin/sh -c '
cp /etc/redis/redis.conf0 /etc/redis/redis.conf &&
echo requirepass $REDIS_PASSOWRD >> /etc/redis/redis.conf &&
redis-server /etc/redis/redis.conf'
django:
container_name: 'django'
build:
context: ./docker/django
dockerfile: Dockerfile
networks:
- django_net
- db_net
- eth_net
- redis_net
tty: true
volumes:
- ./django/:/workspace
- ./eth:/workspace/eth
ports:
- 3000:3000
- 8000:8000
- 8001:8001
environment:
- DJANGO_SECRET_KEY=$DJANGO_SECRET_KEY
- POSTGRES_DJANGO_USER=$POSTGRES_DJANGO_USER
- POSTGRES_DJANGO_PASSWORD=$POSTGRES_DJANGO_PASSWORD
- POSTGRES_DJANGO_DB_NAME=$POSTGRES_DJANGO_DB_NAME
- OAUTH_CLIENT_ID=$OAUTH_CLIENT_ID
- OAUTH_SECRET_ID=$OAUTH_SECRET_ID
- TWILIO_SERVICE_SID=$TWILIO_SERVICE_SID
- TWILIO_ACCOUNT_SID=$TWILIO_ACCOUNT_SID
- TWILIO_AUTH_TOKEN=$TWILIO_AUTH_TOKEN
- BREVO_API_KEY=$BREVO_API_KEY
- BREVO_SENDER_ADDRESS=$BREVO_SENDER_ADDRESS
- REDIS_PASSOWRD=$REDIS_PASSOWRD
- TWO_FA_AUTH_KEY=$TWO_FA_AUTH_KEY
eth:
container_name: 'eth'
build:
context: .
dockerfile: ./docker/eth/Dockerfile
networks:
- eth_net
tty: true
volumes:
- ./eth:/workspace/eth
- node_modules:/workspace/eth/node_modules
expose:
- '8545'
networks:
django_net:
name: django_net
driver: bridge
ipam:
config:
- subnet: 172.38.10.0/24
db_net:
name: db_net
driver: bridge
ipam:
config:
- subnet: 172.38.20.0/24
redis_net:
name: redis_net
driver: bridge
ipam:
config:
- subnet: 172.38.30.0/24
eth_net:
name: eth_net
driver: bridge
ipam:
config:
- subnet: 172.38.40.0/24
volumes:
node_modules: