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 SERVICE=rocketchat
export DOMAIN=rocketchat.example.com
export STACK_NAME=rocketchat export STACK_NAME=rocketchat
export DOMAIN=rocketchat.example.com
## Domain aliases
#export EXTRA_DOMAINS=', `www.wordpress.example.com`'
export LETS_ENCRYPT_ENV=production export LETS_ENCRYPT_ENV=production
# https://docs.rocket.chat/guides/administrator-guides/settings-via-env-vars # https://docs.rocket.chat/guides/administrator-guides/settings-via-env-vars

View File

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

View File

@ -4,14 +4,8 @@ version: '3.8'
services: services:
app: app:
image: rocketchat/rocket.chat:latest image: rocketchat/rocket.chat:latest
command: > depends_on:
bash -c - db
"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)"
volumes: volumes:
- "rocketchat_uploads:/app/uploads" - "rocketchat_uploads:/app/uploads"
secrets: secrets:
@ -30,12 +24,18 @@ services:
- source: entrypoint_conf - source: entrypoint_conf
target: /docker-entrypoint.sh target: /docker-entrypoint.sh
mode: 0555 mode: 0555
entrypoint: /docker-entrypoint.sh
networks: networks:
- internal - internal
- proxy - proxy
depends_on: entrypoint: /docker-entrypoint.sh
- db 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: 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); } });\"" 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 interval: 30s
@ -49,11 +49,13 @@ services:
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.docker.network=proxy" - "traefik.docker.network=proxy"
- "traefik.http.routers.${STACK_NAME}.tls=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000" - "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}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "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: db:
image: mongo:3.6 image: mongo:3.6