mirror of
https://github.com/michelleDeko/scalelite-run.git
synced 2026-02-05 07:40:55 +01:00
Updates for multiple entrypoints to same image
This commit is contained in:
@@ -21,7 +21,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- NGINX_DOMAIN=${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org}
|
- NGINX_DOMAIN=${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org}
|
||||||
depends_on:
|
depends_on:
|
||||||
- scalelite
|
- 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_DOMAIN' < /etc/nginx/sites-available/sites.template > /etc/nginx/sites-enabled/sites.conf && exec nginx -g 'daemon off;'"
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
@@ -29,12 +29,10 @@ services:
|
|||||||
restart: "no"
|
restart: "no"
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:6379:6379
|
- 127.0.0.1:6379:6379
|
||||||
networks:
|
|
||||||
- default
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./redis/data/:/data
|
- ./redis/data/:/data
|
||||||
|
|
||||||
scalelite:
|
scalelite.api:
|
||||||
entrypoint: [bin/start]
|
entrypoint: [bin/start]
|
||||||
image: blindsidenetwks/scalelite:master
|
image: blindsidenetwks/scalelite:master
|
||||||
restart: "no"
|
restart: "no"
|
||||||
@@ -42,21 +40,30 @@ services:
|
|||||||
- 127.0.0.1:3000:3000
|
- 127.0.0.1:3000:3000
|
||||||
links:
|
links:
|
||||||
- redis
|
- redis
|
||||||
networks:
|
|
||||||
- default
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./scalelite/log:/usr/src/app/log
|
# - ./scalelite/log/api:/srv/scalelite/log
|
||||||
- ./scalelite/bin/start:/usr/src/app/bin/start
|
- ./scalelite/bin/start:/srv/scalelite/bin/start
|
||||||
- ./scalelite/tmp/pids/:/usr/src/app/tmp/pids
|
- ./scalelite/tmp/pids/:/usr/src/app/tmp/pids
|
||||||
- ./scalelite/tmp/sockets/:/usr/src/app/tmp/sockets
|
- ./scalelite/tmp/sockets/:/usr/src/app/tmp/sockets
|
||||||
- ./scalelite/tmp/cache/assets:/usr/src/app/tmp/cache/assets
|
- ./scalelite/tmp/cache/assets:/usr/src/app/tmp/cache/assets
|
||||||
# logging:
|
|
||||||
# driver: syslog
|
|
||||||
# options:
|
|
||||||
# syslog-address: udp://logs.$DOMAINNAME:1514
|
|
||||||
# tag: sl.$DOMAINNAME
|
|
||||||
env_file: ./scalelite/.env
|
env_file: ./scalelite/.env
|
||||||
environment:
|
environment:
|
||||||
- REDIS_URL=redis://redis:6379
|
- REDIS_URL=redis://redis:6379
|
||||||
- REDIS_NAMESPACE=scalelite
|
|
||||||
- URL_HOST=sl.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org}
|
- URL_HOST=sl.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org}
|
||||||
|
|
||||||
|
scalelite.poller:
|
||||||
|
entrypoint: [bin/start-poller]
|
||||||
|
image: blindsidenetwks/scalelite:master
|
||||||
|
restart: "no"
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:3001:3000
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
volumes:
|
||||||
|
# - ./scalelite/log/poller:/srv/scalelite/log
|
||||||
|
- ./scalelite/bin/start-poller:/srv/scalelite/bin/start-poller
|
||||||
|
env_file: ./scalelite/.env
|
||||||
|
environment:
|
||||||
|
- REDIS_URL=redis://redis:6379
|
||||||
|
- URL_HOST=sl.${DOMAIN_SUB:-lab}.${DOMAIN_ROOT:-bigbluebutton.org}
|
||||||
|
- INTERVAL=60
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#### For <sl.$NGINX_DOMAIN>
|
#### For <sl.$NGINX_DOMAIN>
|
||||||
|
|
||||||
upstream docker-scalelite {
|
upstream docker-scalelite {
|
||||||
server scalelite:3000;
|
server scalelite.api:3000;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
SECRET_KEY_BASE=secret_key_base
|
SECRET_KEY_BASE=secret_key_base
|
||||||
|
LOADBALANCER_SECRET=8cd8ef52e8e101574e400365b55e11a6
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
bundle exec puma -C config/puma.rb
|
|
||||||
|
|
||||||
|
servers="$(RAILS_ENV=$RAILS_ENV bundle exec rake servers 2>&1)"
|
||||||
|
echo $servers
|
||||||
|
|
||||||
|
if [ "$(echo "$servers" | cut -c0-2)" == "No" ]; then
|
||||||
|
echo ">>> Add test-install as the default server"
|
||||||
|
bundle exec rake servers:add["https://test-install.blindsidenetworks.com/bigbluebutton/api","8cd8ef52e8e101574e400365b55e11a6"]
|
||||||
|
bundle exec rake servers
|
||||||
|
bundle exec rake status
|
||||||
|
else
|
||||||
|
echo ">>> Do nothing"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exec tini -- bundle exec puma -C config/puma.rb "$@"
|
||||||
#tail -f /dev/null
|
#tail -f /dev/null
|
||||||
|
#bundle exec puma -C config/puma.rb
|
||||||
#bundle exec rails s -b 0.0.0.0 -p 3000
|
#bundle exec rails s -b 0.0.0.0 -p 3000
|
||||||
|
|||||||
5
scalelite/bin/start-poller
Executable file
5
scalelite/bin/start-poller
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Poller is starting..."
|
||||||
|
exec tini -- bundle exec rake poll["$INTERVAL"]
|
||||||
|
#tail -f /dev/null
|
||||||
@@ -1 +1,2 @@
|
|||||||
SECRET_KEY_BASE=secret_key_base
|
SECRET_KEY_BASE=secret_key_base
|
||||||
|
LOADBALANCER_SECRET=8cd8ef52e8e101574e400365b55e11a6
|
||||||
|
|||||||
Reference in New Issue
Block a user