forked from maisieccino/omni-dash
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
63 lines (60 loc) · 1.69 KB
/
docker-compose-prod.yml
File metadata and controls
63 lines (60 loc) · 1.69 KB
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
version: "3.3"
services:
nginx:
container_name: nginx
restart: always
image: nginx:1.13
ports:
- "80:80"
- "443:443"
volumes:
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "certs:/etc/nginx/certs:ro"
nginx-gen:
container_name: nginx-gen
build:
context: ./
dockerfile: Dockerfile.nginx-gen
restart: always
volumes:
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "certs:/etc/nginx/certs:ro"
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
letsencrypt-nginx-proxy-companion:
restart: always
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "certs:/etc/nginx/certs:rw"
environment:
- NGINX_DOCKER_GEN_CONTAINER=nginx-gen
web:
image: mbellgb/hatch-site-prod # assumes image is on docker hub
container_name: web
restart: always
expose:
- "3000"
env_file:
- ".env"
build:
dockerfile: ./Dockerfile
command: ["sh", "run-prod.sh"]
environment:
- RAILS_ENV=production
- VIRTUAL_HOST=${SITE_HOSTNAME}
- VIRTUAL_PORT=3000
- LETSENCRYPT_HOST=${SITE_HOSTNAME}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
volumes:
nginx_conf:
nginx_vhost:
nginx_html:
certs: