Generalized hostname

This commit is contained in:
jfederico
2020-02-11 15:34:12 -05:00
parent 675f8f6f27
commit b6b4dac8b5
5 changed files with 11 additions and 8 deletions

View File

@@ -19,10 +19,10 @@ services:
- "80:80" - "80:80"
- "443:443" - "443:443"
environment: environment:
- NGINX_DOMAIN=${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org} - NGINX_HOSTNAME=${HOST_NAME:-sl}.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org}
depends_on: depends_on:
- scalelite.api - scalelite.api
command: /bin/bash -c "envsubst '$$NGINX_DOMAIN' < /etc/nginx/sites-available/sites.template > /etc/nginx/sites-enabled/sites.conf && exec nginx -g 'daemon off;'" command: /bin/bash -c "envsubst '$$NGINX_HOSTNAME' < /etc/nginx/sites-available/sites.template > /etc/nginx/sites-enabled/sites.conf && exec nginx -g 'daemon off;'"
redis: redis:
image: redis image: redis
@@ -49,7 +49,7 @@ services:
env_file: ./scalelite/.env env_file: ./scalelite/.env
environment: environment:
- REDIS_URL=redis://redis:6379 - REDIS_URL=redis://redis:6379
- URL_HOST=sl.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org} - URL_HOST=${HOST_NAME:-sl}.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org}
scalelite.poller: scalelite.poller:
entrypoint: [bin/start-poller] entrypoint: [bin/start-poller]
@@ -65,5 +65,5 @@ services:
env_file: ./scalelite/.env env_file: ./scalelite/.env
environment: environment:
- REDIS_URL=redis://redis:6379 - REDIS_URL=redis://redis:6379
- URL_HOST=sl.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org} - URL_HOST=${HOST_NAME:-sl}.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org}
- INTERVAL=60 - INTERVAL=60

1
dotenv
View File

@@ -1,2 +1,3 @@
DOMAIN_ROOT=bigbluebutton.org DOMAIN_ROOT=bigbluebutton.org
DOMAIN_SUB=lab DOMAIN_SUB=lab
HOST_NAME=sl

View File

@@ -1,19 +1,19 @@
#### For <sl.$NGINX_DOMAIN> #### For <$NGINX_HOSTNAME>
upstream docker-scalelite { upstream docker-scalelite {
server scalelite.api:3000; server scalelite.api:3000;
} }
server { server {
server_name sl.$NGINX_DOMAIN; server_name $NGINX_HOSTNAME;
listen 80; listen 80;
listen [::]:80; listen [::]:80;
listen 443 ssl; listen 443 ssl;
listen [::]:443; listen [::]:443;
ssl_certificate /etc/letsencrypt/live/sl.$NGINX_DOMAIN/fullchain.pem; ssl_certificate /etc/letsencrypt/live/$NGINX_HOSTNAME/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sl.$NGINX_DOMAIN/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/$NGINX_HOSTNAME/privkey.pem;
location / { location / {
proxy_pass http://docker-scalelite; proxy_pass http://docker-scalelite;

View File

@@ -1,2 +1,3 @@
SECRET_KEY_BASE=secret_key_base SECRET_KEY_BASE=secret_key_base
LOADBALANCER_SECRET=8cd8ef52e8e101574e400365b55e11a6 LOADBALANCER_SECRET=8cd8ef52e8e101574e400365b55e11a6
HOST_NAME=sl

View File

@@ -10,6 +10,7 @@ if [ "$(echo "$servers" | cut -c0-2)" == "No" ]; then
bundle exec rake servers:add["https://test-install.blindsidenetworks.com/bigbluebutton/api","8cd8ef52e8e101574e400365b55e11a6"] bundle exec rake servers:add["https://test-install.blindsidenetworks.com/bigbluebutton/api","8cd8ef52e8e101574e400365b55e11a6"]
bundle exec rake servers bundle exec rake servers
bundle exec rake status bundle exec rake status
echo ">>> Server must be enabled from the console"
else else
echo ">>> Do nothing" echo ">>> Do nothing"
fi fi