-
Notifications
You must be signed in to change notification settings - Fork 1
/
stack.yml
122 lines (114 loc) · 3.62 KB
/
stack.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
version: '3.7'
volumes:
postgresql_data:
redis_data:
discourse_data:
sidekiq_data:
networks:
frontal-stage:
external: true
frontal-prod:
external: true
services:
postgresql:
image: bitnami/postgresql:11
volumes:
- 'postgresql_data:/bitnami/postgresql'
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=${IS_DEV}
- POSTGRESQL_USERNAME=bn_discourse
- POSTGRESQL_DATABASE=bitnami_discourse
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.labels.${PROJECT} == ${ENVIRONMENT}
redis:
image: bitnami/redis:6.0
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=${IS_DEV}
volumes:
- 'redis_data:/bitnami/redis'
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.labels.${PROJECT} == ${ENVIRONMENT}
discourse:
image: bitnami/discourse:2.7.13
volumes:
- 'discourse_data:/bitnami/discourse'
depends_on:
- postgresql
- redis
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=${IS_DEV}
- DISCOURSE_HOST=${HOST}
- DISCOURSE_DATABASE_HOST=postgresql
- DISCOURSE_DATABASE_PORT_NUMBER=5432
- DISCOURSE_DATABASE_USER=bn_discourse
- DISCOURSE_DATABASE_NAME=bitnami_discourse
- DISCOURSE_REDIS_HOST=redis
- DISCOURSE_REDIS_PORT_NUMBER=6379
- POSTGRESQL_CLIENT_POSTGRES_USER=postgres
- POSTGRESQL_CLIENT_CREATE_DATABASE_NAME=bitnami_discourse
- POSTGRESQL_CLIENT_CREATE_DATABASE_EXTENSIONS=hstore,pg_trgm
- DISCOURSE_SMTP_HOST=${SMTP_HOST}
- DISCOURSE_SMTP_PORT=${SMTP_PORT}
- DISCOURSE_SMTP_USER=${SMTP_USER}
- DISCOURSE_SMTP_PASSWORD=${SMTP_PASSWORD}
- DISCOURSE_SMTP_PROTOCOL=${SMTP_PROTOCOL}
- DISCOURSE_ENABLE_CORS=true
- DISCOURSE_CORS_ORIGIN=http://localhost:64227
- DISCOURSE_ALWAYS_INCLUDE_TOPIC_EXCERPTS=true
networks:
- frontal-${ENVIRONMENT}
- default
deploy:
mode: replicated
replicas: 1
labels:
traefik.frontend.rule: Host:${HOST}
traefik.frontend.headers.customResponseHeaders: "Access-Control-Allow-Origin:*||Access-Control-Allow-Headers:*"
traefik.port: 3000
traefik.enable: "true"
traefik.tags: "${ENVIRONMENT}"
placement:
constraints:
- node.labels.${PROJECT} == ${ENVIRONMENT}
sidekiq:
image: bitnami/discourse:2.7.13
depends_on:
- discourse
volumes:
- 'sidekiq_data:/bitnami/discourse'
command: /opt/bitnami/scripts/discourse-sidekiq/run.sh
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=${IS_DEV}
- DISCOURSE_HOST=${HOST}
- DISCOURSE_DATABASE_HOST=postgresql
- DISCOURSE_DATABASE_PORT_NUMBER=5432
- DISCOURSE_DATABASE_USER=bn_discourse
- DISCOURSE_DATABASE_NAME=bitnami_discourse
- DISCOURSE_REDIS_HOST=redis
- DISCOURSE_REDIS_PORT_NUMBER=6379
- DISCOURSE_SMTP_HOST=${SMTP_HOST}
- DISCOURSE_SMTP_PORT=${SMTP_PORT}
- DISCOURSE_SMTP_USER=${SMTP_USER}
- DISCOURSE_SMTP_PASSWORD=${SMTP_PASSWORD}
- DISCOURSE_SMTP_PROTOCOL=${SMTP_PROTOCOL}
- DISCOURSE_ENABLE_CORS=true
- DISCOURSE_ALWAYS_INCLUDE_TOPIC_EXCERPTS=true
- DISCOURSE_CORS_ORIGIN=http://localhost:64227
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.labels.${PROJECT} == ${ENVIRONMENT}