Simplified use of HOST_NAME

This commit is contained in:
jfederico
2020-02-13 13:49:31 -05:00
parent af52c8cdbe
commit 9869c53d18
4 changed files with 13 additions and 9 deletions

View File

@@ -16,8 +16,7 @@ using docker-compose.
- [scalelite](https://cloud.docker.com/u/blindsidenetwks/repository/docker/blindsidenetwks/scalelite) - [scalelite](https://cloud.docker.com/u/blindsidenetwks/repository/docker/blindsidenetwks/scalelite)
- Make sure you have your own DNS and a public domain name or a delegated one under blindside-dev.com - Make sure you have your own DNS and a public domain name or a delegated one (e.g. <JOHN>.blindside-dev.com).
(e.g. <JOHN>.blindside-dev.com)
## Preliminary steps ## Preliminary steps

View File

@@ -20,11 +20,12 @@ services:
- "80:80" - "80:80"
- "443:443" - "443:443"
environment: environment:
- NGINX_HOSTNAME=${HOST_NAME:-sl}.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org} - NGINX_HOSTNAME=${HOST_NAME:-sl.xlab.blindside-dev.com}
depends_on: depends_on:
- scalelite.api - scalelite.api
command: /bin/bash -c "envsubst '$$NGINX_HOSTNAME' < /etc/nginx/sites-available/sites.template > /etc/nginx/sites-enabled/sites.conf && while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g 'daemon off;'" command: /bin/bash -c "envsubst '$$NGINX_HOSTNAME' < /etc/nginx/sites-available/sites.template > /etc/nginx/sites-enabled/sites.conf && while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g 'daemon off;'"
certbot: certbot:
image: certbot/certbot image: certbot/certbot
volumes: volumes:
@@ -32,6 +33,7 @@ services:
- ./data/certbot/www:/var/www/certbot - ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
redis: redis:
image: redis image: redis
restart: "no" restart: "no"
@@ -40,6 +42,7 @@ services:
volumes: volumes:
- ./data/redis/:/data - ./data/redis/:/data
postgres: postgres:
image: postgres:9.5 image: postgres:9.5
restart: "no" restart: "no"
@@ -53,6 +56,7 @@ services:
- PGUSER=postgres - PGUSER=postgres
- PGPASSWORD=password - PGPASSWORD=password
scalelite.api: scalelite.api:
entrypoint: [bin/start] entrypoint: [bin/start]
image: blindsidenetwks/scalelite:master image: blindsidenetwks/scalelite:master
@@ -76,7 +80,8 @@ services:
- DB_NAME=scalelite_production - DB_NAME=scalelite_production
- DB_USERNAME=postgres - DB_USERNAME=postgres
- DB_PASSWORD=password - DB_PASSWORD=password
- URL_HOST=${HOST_NAME:-sl}.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org} - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}
scalelite.poller: scalelite.poller:
entrypoint: [bin/start-poller] entrypoint: [bin/start-poller]
@@ -92,5 +97,5 @@ services:
env_file: ./scalelite/.env env_file: ./scalelite/.env
environment: environment:
- REDIS_URL=redis://redis:6379 - REDIS_URL=redis://redis:6379
- URL_HOST=${HOST_NAME:-sl}.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org} - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}
- INTERVAL=60 - INTERVAL=60

4
dotenv
View File

@@ -1,3 +1 @@
DOMAIN_ROOT=bigbluebutton.org HOST_NAME=sl.xlab.blindside-dev.com
DOMAIN_SUB=lab
HOST_NAME=sl

View File

@@ -5,7 +5,9 @@ if ! [ -x "$(command -v docker-compose)" ]; then
exit 1 exit 1
fi fi
domains=(example.org www.example.org) HOST_NAME=$(grep HOST_NAME .env | cut -d '=' -f2)
domains=($HOST_NAME)
rsa_key_size=4096 rsa_key_size=4096
data_path="./data/certbot" data_path="./data/certbot"
email="" # Adding a valid address is strongly recommended email="" # Adding a valid address is strongly recommended