-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.prod.yml
80 lines (67 loc) · 1.71 KB
/
docker-compose.prod.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
version: '2.2'
volumes:
mysql:
services:
# mysql:
# image: mysql:5.7
# restart: always
# env_file: .env.prod
# volumes:
# - mysql:/var/lib/mysql
# # CREATE DATABASE IF NOT EXISTS ${DB_DATABASE}
memcached:
image: memcached
restart: always
# artisan:
# image: hotsapi/hotsapi
# restart: never
# env_file: .env.prod
web:
image: hotsapi/webserver
restart: always
env_file: .env.prod
environment:
VIRTUAL_HOST: hotsapi.net
LETSENCRYPT_HOST: hotsapi.net
HTTPS_METHOD: noredirect
nginx_client_max_body_size: 30M
depends_on:
- memcached
worker:
image: hotsapi/hotsapi
restart: always
env_file: .env.prod
volumes:
- /.gcloud.json:/var/www/hotsapi/.gcloud.json
command: ['queue:work', '--sleep=3', '--tries=3', '--timeout=60']
depends_on:
- memcached
scale: 0
parser:
image: hotsapi/hotsapi
restart: always
env_file: .env.prod
command: ['hotsapi:parse']
# throttle this container first if not enough CPU
# default value for other containers is 1024
cpu_shares: 2
scale: 3
scheduler:
image: hotsapi/hotsapi
restart: always
env_file: .env.prod
entrypoint: 'bash -c "while [ true ]; do php artisan schedule:run --verbose --no-interaction & sleep 60; done"'
prune:
image: hotsapi/prune
env_file: .env.prod
environment:
CRON_TIME: '00 28 02 * * *'
# todo run this on cron
# TODO:
# move parser and heroprotocol dockerfiles to respective repos and wrap them as separate services
# php artisan migrate --force
# update on heroprotocol/c# parser updates
networks:
default:
external:
name: frontend_default