-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
discourse.yml
85 lines (78 loc) · 2.46 KB
/
discourse.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
# DOMAIN=example.com docker stack deploy -c discourse.yml discourse
x-defaults: &defaults
image: bitnami/discourse:${VERSION:-3.3.2}
environment:
DISCOURSE_DATABASE_HOST: postgres
DISCOURSE_DATABASE_NAME: discourse
DISCOURSE_DATABASE_USER: discourse
DISCOURSE_DATABASE_PASSWORD: myp@ssw0rd
DISCOURSE_USERNAME: ${ADMIN_USERNAME:-admin}
DISCOURSE_PASSWORD: ${ADMIN_PASSWORD:-myp@ssw0rd}
DISCOURSE_EMAIL: ${ADMIN_EMAIL:[email protected]}
DISCOURSE_HOST: ${DOMAIN:-discourse.localhost}
DISCOURSE_PORT: 3000
DISCOURSE_SMTP_HOST: ${SMTP_HOST}
DISCOURSE_SMTP_PORT: ${SMTP_PORT}
DISCOURSE_SMTP_USER: ${SMTP_USER}
DISCOURSE_SMTP_PASSWORD: ${SMTP_PASSWORD}
DISCOURSE_SMTP_AUTH: ${SMTP_AUTH:-login}
DISCOURSE_SMTP_PROTOCOL: ${SMTP_PROTOCOL:-tls}
DISCOURSE_SMTP_ENABLE_START_TLS: ${SMTP_TLS:-true}
DISCOURSE_NOTIFICATION_EMAIL: ${SMTP_FROM:[email protected]}
ALLOW_EMPTY_PASSWORD: "yes"
GITLAB_APP_ID: ${GITLAB_APP_ID}
GITLAB_SECRET: ${GITLAB_SECRET}
GITLAB_URL: ${GITLAB_URL}
BITNAMI_DEBUG: ${BITNAMI_DEBUG:-false}
DISCOURSE_EXTRA_CONF_CONTENT: |
force_https = true
services:
discourse:
<<: *defaults
volumes:
- ${VOLUME_PATH}data:/bitnami
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.discourse-${NUMBER:-1}.rule=Host(`${DOMAIN:-discourse.localhost}`)
- traefik.http.routers.discourse-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.discourse-${NUMBER:-1}.service=discourse-${NUMBER:-1}
- traefik.http.routers.discourse-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.discourse-${NUMBER:-1}.loadbalancer.server.port=3000
networks:
- traefik
- internal
sidekiq:
<<: *defaults
command: /opt/bitnami/scripts/discourse-sidekiq/run.sh
volumes:
- ${VOLUME_PATH}sidekiq:/bitnami
networks:
- internal
postgres:
image: postgres:${POSTGRES_VERSION:-12-alpine}
environment:
- POSTGRES_DB=discourse
- POSTGRES_USER=discourse
- POSTGRES_PASSWORD=myp@ssw0rd
volumes:
- ${VOLUME_PATH}postgres:/var/lib/postgresql/data
networks:
- internal
redis:
image: redis:6-alpine
environment:
- ALLOW_EMPTY_PASSWORD=yes
networks:
- internal
volumes:
postgres:
data:
sidekiq:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net