-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
67 lines (66 loc) · 2.18 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
# default configuration for production
# use .env file to differentiate between prod and dev
version: '3.4'
services:
module-handbook-postgres:
container_name: modulehandbook-database
image: postgres:13.4-alpine
# container_name: module-handbook-postgres
environment:
- APPLICATION=module-handbook
- POSTGRES_PASSWORD=modhand
- POSTGRES_USER=modhand
- POSTGRES_DB=modhand-db-prod
# https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
- POSTGRES_HOST_AUTH_METHOD=password
volumes:
- ./pg_data:/var/lib/postgresql/data
restart: always
module-handbook-exporter:
image: ghcr.io/modulehandbook/exporter:${TAG_MODULE_HANDBOOK_EXPORTER}
container_name: modulehandbook-exporter
restart: always
module-handbook:
image: ghcr.io/modulehandbook/modulehandbook:${TAG_MODULE_HANDBOOK}
container_name: modulehandbook
environment:
- TAG
- RAILS_ENV=production
- RAILS_DB_HOST="module-handbook-postgres"
- POSTGRES_USER=modhand
- POSTGRES_PASSWORD=modhand
- POSTGRES_DB=modhand-db-prod
- RAILS_SERVE_STATIC_FILES=true
- EXPORTER_BASE_URL=${EXPORTER_BASE_URL:-http://module-handbook-exporter:3030/}
- DEVISE_EMAIL_HOSTNAME=${DEVISE_EMAIL_HOSTNAME}
- DEVISE_EMAIL=${DEVISE_EMAIL}
env_file:
- ${SECRET_ENV_FILE}
depends_on:
- module-handbook-postgres
- module-handbook-exporter
volumes:
- ./container_logs:/module-handbook/log
restart: always
nginx:
image: nginx:latest
container_name: reverse_proxy
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/templates:/etc/nginx/templates
- ./container_logs/nginx:/var/log/nginx
- ./secrets/nginx:/etc/ssl
ports:
- "80:80"
- "443:443"
environment:
- NGINX_HOST=${NGINX_HOST:-localhost}
- NGINX_CERT=${NGINX_CERT:-/etc/ssl/server.crt}
- NGINX_KEY=${NGINX_KEY:-/etc/ssl/server.key}
- NGINX_PORT=80
- NGINX_SSL_PORT=443
- NGINX_PROXY=http://module-handbook:3000
- NGINX_ENTRYPOINT_QUIET_LOGS=1
depends_on:
- module-handbook
restart: always