Update service names, add EXTRA_DOMAINS
All checks were successful
continuous-integration/drone/push Build is passing

See compose-stacks/organising#15 & compose-stacks/organising#19
This commit is contained in:
3wc 2020-10-06 01:37:54 +02:00
parent 07619d3e52
commit 3355220c99
3 changed files with 20 additions and 15 deletions

View File

@ -1,6 +1,9 @@
export SERVICE=rocketchat
export DOMAIN=rocketchat.example.com
export STACK_NAME=rocketchat
export DOMAIN=rocketchat.example.com
## Domain aliases
#export EXTRA_DOMAINS=', `www.wordpress.example.com`'
export LETS_ENCRYPT_ENV=production
# https://docs.rocket.chat/guides/administrator-guides/settings-via-env-vars

View File

@ -2,7 +2,7 @@
version: '3.8'
services:
rocketchat:
app:
secrets:
- oauth_key
environment:

View File

@ -4,14 +4,8 @@ version: '3.8'
services:
app:
image: rocketchat/rocket.chat:latest
command: >
bash -c
"for i in `seq 1 30`; do
node main.js &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 secs...\";
sleep 5;
done; (exit $$s)"
depends_on:
- db
volumes:
- "rocketchat_uploads:/app/uploads"
secrets:
@ -30,12 +24,18 @@ services:
- source: entrypoint_conf
target: /docker-entrypoint.sh
mode: 0555
entrypoint: /docker-entrypoint.sh
networks:
- internal
- proxy
depends_on:
- db
entrypoint: /docker-entrypoint.sh
command: >
bash -c
"for i in `seq 1 30`; do
node main.js &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 secs...\";
sleep 5;
done; (exit $$s)"
healthcheck:
test: "nodejs -e \"http.get('http://localhost:3000', (res) => { console.log('status: ', res.statusCode); if (res.statusCode == 200) { process.exit(0); } else { process.exit(1); } });\""
interval: 30s
@ -49,11 +49,13 @@ services:
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.${STACK_NAME}.tls=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
db:
image: mongo:3.6