blob: f2b9de8a4373e867924d2d81633088e057bd041c (
plain)
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
|
version: '3'
volumes:
database_data:
driver: local
services:
nginx:
image: nginx:latest
restart: "no"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/sites-enabled:/etc/nginx/sites-enabled
- ./nginx/sites.template:/etc/nginx/sites-available/sites.template
- ./nginx/default/html:/var/www/html
- ./nginx/log/nginx:/var/log/nginx
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
ports:
- "80:80"
- "443:443"
environment:
- NGINX_HOSTNAME=${HOST_NAME:-sl.xlab.blindside-dev.com}
depends_on:
- scalelite.api
command: /bin/bash -c "envsubst '$$NGINX_HOSTNAME' < /etc/nginx/sites-available/sites.template > /etc/nginx/sites-enabled/sites.conf && while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g 'daemon off;'"
certbot:
image: certbot/certbot
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;'"
redis:
image: redis
restart: "no"
ports:
- 127.0.0.1:6379:6379
volumes:
- ./data/redis/:/data
postgres:
image: postgres:9.5
restart: "no"
ports:
- 127.0.0.1:5432:5432
volumes:
- ./data/postgres/:/var/lib/postgresql/data
environment:
- PGHOST=postgres
- PGDATABASE=postgres
- PGUSER=postgres
- PGPASSWORD=password
scalelite.api:
entrypoint: [bin/start]
image: blindsidenetwks/scalelite:latest
restart: "no"
ports:
- 127.0.0.1:3000:3000
links:
- redis
- postgres
volumes:
- ./scalelite/log/api:/srv/scalelite/log
- ./scalelite/bin/start:/srv/scalelite/bin/start
- ./scalelite/config/database.yml:/srv/scalelite/config/database.yml
- ./scalelite/tmp/pids/:/usr/src/app/tmp/pids
- ./scalelite/tmp/sockets/:/usr/src/app/tmp/sockets
- ./scalelite/tmp/cache/assets:/usr/src/app/tmp/cache/assets
env_file: ./scalelite/.env
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgres://postgres:password@postgres:5432/scalelite?pool=5
- URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}
scalelite.poller:
entrypoint: [bin/start-poller]
image: blindsidenetwks/scalelite:latest
restart: "no"
ports:
- 127.0.0.1:3001:3000
links:
- redis
volumes:
- ./scalelite/log/poller:/srv/scalelite/log
- ./scalelite/bin/start-poller:/srv/scalelite/bin/start-poller
env_file: ./scalelite/.env
environment:
- REDIS_URL=redis://redis:6379
- URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}
|