-
Notifications
You must be signed in to change notification settings - Fork 108
/
production.yml
69 lines (69 loc) · 1.85 KB
/
production.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
##################################################################
#
# production.yml
#
# author: Rion Dooley <[email protected]>
#
# This is a docker compose file for running the Lightning data
# vizualization server in moderate production outside of Heroku
# using a PostgreSQL database, reverse proxy, and horizontal scaling.
# The server will be available on ports 80 and 443 on your Docker
# host.
#
# To add authentication to the server, or leverage Amazon S3 storage,
# fill in the environment variables with the appropriate values.
#
# Run with:
#
# docker-compose -f production.yml
#
# Notes:
#
# - Log management, database persistence, and monitoring are
# intentionally left out of this orchestration so you can use
# your favorite solutions.
#
# - To add ssl to the above proxy, replace the %%SSL_CERTIFICATE_PATH%%
# value with the path to the directory containing your SSL certs
# and set SSL: TRUE in the proxy environment section
# ssl cert folder SSL add a proxy server such as.
#
# - To scale the lightning server, use fig to start up more web
# containers. The following command should be sufficient.
#
# docker-compose -f production.yml scale web=2
#
###################################################################
proxy:
image: jwilder/nginx-proxy
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
ports:
- "80:80"
- "443:443"
environment:
SSL: FALSE
web:
extends:
file: common.yml
service: web
command: bash -c "node server.js"
links:
- db
environment:
VIRTUAL_PORT: 3000
VIRTUAL_HOST: docker.example.com
NODE_ENV: production
DATABASE_URL: lightning:changeit@db:5432/postgres
LIGHTNING_USERNAME:
LIGHTNING_PASSWORD:
S3_KEY:
S3_BUCKET:
S3_SECRET:
db:
image: postgres
environment:
POSTGRES_USER: lightning
POSTGRES_PASSWORD: changeit
ports:
- 5432