-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
73 lines (67 loc) · 2.12 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
version: '3'
services:
nginx:
image: nginx
restart: 'always'
ports:
- '80:80'
- '443:443'
volumes:
- ./deploy/nginx.portal.conf:/etc/nginx/conf.d/default.conf:ro
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
postgres:
image: dockerhub.qingcloud.com/pressone/postgres
hostname: postgres
ports:
- 5432:5432
volumes:
- ./pg-init-scripts:/docker-entrypoint-initdb.d
- ./postgresql:/var/lib/postgresql/data
environment:
POSTGRES_MULTIPLE_DATABASES: flying_pub,flying_pub_wallet
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 39f12851f5275222e8b50fddddf04ee4
redis:
image: 'dockerhub.qingcloud.com/pressone/redis:alpine'
ports:
- '6379:6379'
command: redis-server --requirepass a863a35d270fceb110f96374d75c219f --appendonly yes
volumes:
- './redis:/data'
restart: 'always'
flying-pub:
image: 'dockerhub.qingcloud.com/pressone/flying-pub'
command: bash -c "cd server && yarn start-prod"
restart: 'always'
ports:
- '9000:9000'
volumes:
- ./config/config.js:/app/server/config.js:ro
- ./config/config.wallet.js:/app/server/config.wallet.js
- ./uploads:/app/server/build/uploads
logging:
driver: 'json-file'
options:
max-file: '5'
max-size: '10m'
flying-pub-queue:
image: 'dockerhub.qingcloud.com/pressone/flying-pub'
command: bash -c "sleep 60 && cd server && yarn start-queue-prod"
volumes:
- ./config/config.js:/app/server/config.js:ro
- ./config/config.wallet.js:/app/server/config.wallet.js
restart: 'always'
logging:
driver: 'json-file'
options:
max-file: '5'
max-size: '10m'