-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
82 lines (75 loc) · 1.92 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
74
75
76
77
78
79
80
81
82
version: '3'
services:
postgres:
image: postgres:alpine
restart: unless-stopped
expose:
- 5432
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres:/var/lib/postgresql/data
redis:
image: redis:alpine
restart: unless-stopped
expose:
- 6379
backend:
image: ghcr.io/espcd/espcd-backend
restart: unless-stopped
expose:
- 3000
environment:
- ESPCD_BACKEND_DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379/1
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- VIRTUAL_HOST=${BACKEND_HOST}
- VIRTUAL_PORT=3000
- LETSENCRYPT_HOST=${BACKEND_HOST}
volumes:
- storage:/app/storage
command: sh -c "rake db:create && rake db:migrate && rake db:seed && rails s -b 0.0.0.0"
depends_on:
- postgres
- redis
frontend:
image: ghcr.io/espcd/espcd-frontend
restart: unless-stopped
expose:
- 80
environment:
- VIRTUAL_HOST=${FRONTEND_HOST},www.${FRONTEND_HOST}
- LETSENCRYPT_HOST=${FRONTEND_HOST},www.${FRONTEND_HOST}
nginx-proxy:
build: ./proxy
restart: unless-stopped
ports:
- 80:80
- 443:443
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
acme-companion:
image: nginxproxy/acme-companion
restart: unless-stopped
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
- acme:/etc/acme.sh
depends_on:
- proxy
volumes:
postgres:
storage:
certs:
vhost.d:
html:
acme: