-
Notifications
You must be signed in to change notification settings - Fork 79
/
docker-compose.prod.yml
102 lines (101 loc) · 3.14 KB
/
docker-compose.prod.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# NOTE: This files shows a possible production setup.
# If you are not familiar with handling containers in production, please
# consider a different approach of hosting. This setup can lead to
# errors and loss of production data if handled incorrectly. Currently
# WARNING: Currently, container based setups are not officially supported by Humhub GmbH.
# Use at your own risk!
version: '3.1'
services:
nginx:
image: docker.io/mriedmann/humhub:stable-nginx
ports:
- "8080:80"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/ping"]
interval: 30s
timeout: 10s
retries: 3
volumes:
- "uploads:/var/www/localhost/htdocs/uploads"
- "assets:/var/www/localhost/htdocs/assets"
- "modules:/var/www/localhost/htdocs/protected/modules"
- "themes:/var/www/localhost/htdocs/themes"
humhub:
image: docker.io/mriedmann/humhub:stable-phponly
expose:
- '9000'
environment:
HUMHUB_DB_USER: ${HUMHUB_DB_USER}
HUMHUB_DB_PASSWORD: ${HUMHUB_DB_PASSWORD}
HUMHUB_DB_HOST: 'db'
HUMHUB_DB_NAME: 'humhub'
HUMHUB_AUTO_INSTALL: 1
# HUMHUB_DEBUG: 1 # you can currently not use debug in prod
HUMHUB_PROTO: 'https'
HUMHUB_HOST: 'localhost'
# Mailer install setup
HUMHUB_MAILER_SYSTEM_EMAIL_ADDRESS: 'noreply@example.com'
HUMHUB_MAILER_SYSTEM_EMAIL_NAME: 'HumHub'
HUMHUB_MAILER_TRANSPORT_TYPE: 'smtp'
HUMHUB_MAILER_HOSTNAME: 'mailer'
HUMHUB_MAILER_PORT: 1025
#HUMHUB_MAILER_USERNAME:
#HUMHUB_MAILER_PASSWORD:
#HUMHUB_MAILER_ENCRYPTION:
HUMHUB_MAILER_ALLOW_SELF_SIGNED_CERTS: 0
# Cache Config
HUMHUB_CACHE_EXPIRE_TIME: 3600
HUMHUB_CACHE_CLASS: yii\redis\Cache
HUMHUB_QUEUE_CLASS: humhub\modules\queue\driver\Redis
HUMHUB_REDIS_HOSTNAME: redis
HUMHUB_REDIS_PORT: 6379
HUMHUB_REDIS_PASSWORD: redis_password
volumes:
- "uploads:/var/www/localhost/htdocs/uploads"
- "assets:/var/www/localhost/htdocs/assets"
- "modules:/var/www/localhost/htdocs/protected/modules"
- "themes:/var/www/localhost/htdocs/themes"
# - "${HUMHUB_VOLUME_CONFIG}:/var/www/localhost/htdocs/protected/config"
healthcheck:
test: ["CMD", "php-fpm-healthcheck"]
interval: 30s
timeout: 10s
retries: 3
db:
image: mariadb:10.4
environment:
MYSQL_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MYSQL_DATABASE: 'humhub'
MYSQL_USER: ${HUMHUB_DB_USER}
MYSQL_PASSWORD: ${HUMHUB_DB_PASSWORD}
volumes:
- "mysql:/var/lib/mysql"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
interval: 30s
timeout: 10s
retries: 3
mailer:
image: sj26/mailcatcher:latest
restart: always
expose:
- 1025
ports:
- "1080:1080"
redis:
image: redis:5.0-alpine
expose:
- '6379'
# volumes:
# - /srv/humhub/redis:/data
environment:
- REDIS_PASSWORD=redis_password
#- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
volumes:
uploads: {}
assets: {}
modules: {}
themes: {}
mysql: {}