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
version: '3'
services:
xg-login-admin:
build: .
command: gunicorn -c deployment/gunicorn.py app:app
container_name: xg-login-admin
environment:
FLASK_APP: app.py
FLASK_ENV: production
CONFIG_NAME: qcloud
SCRIPT_NAME: xg-login
ports:
- '5000:5000'
volumes:
- .:/var/www/xg-login-admin
- /data/:/data/
depends_on:
- redis
- postgres
links:
- redis
- postgres
network_mode: bridge
celery:
build: .
command: python run_celery.py worker -l info --beat -c 4
container_name: xg-login-celery
environment:
FLASK_APP: app.py
FLASK_ENV: production
CONFIG_NAME: qcloud
volumes:
- .:/var/www/xg-login-admin
depends_on:
- redis
- postgres
links:
- redis
- postgres
network_mode: bridge
redis:
image: redis
restart: always
hostname: redis
container_name: redis
network_mode: bridge
ports:
- '63791:6379'
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./deployment/redis.conf:/usr/local/etc/redis/redis.conf
- /data/redis/:/data/
postgres:
image: postgres:latest
restart: always
container_name: postgres
environment:
POSTGRES_PASSWORD: intern
POSTGRES_USER: intern
POSTGRES_DB: ios_mockgateway_api
volumes:
- ./db:/docker-entrypoint-initdb.d
- /data/postgres/:/var/lib/postgresql/data
network_mode: bridge