mirror of
https://github.com/michelleDeko/scalelite-run.git
synced 2025-12-16 14:22:11 +01:00
fixes for redis and restored autoupdate of certificates
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
.env
|
||||
.env*
|
||||
|
||||
/redis/log*
|
||||
|
||||
|
||||
38
README.md
38
README.md
@@ -48,3 +48,41 @@ Also, when using the `init-letsencrypt.sh` script, you should add the email.
|
||||
```
|
||||
LETSENCRYPT_EMAIL=
|
||||
```
|
||||
|
||||
Obtain the value for SECRET_KEY_BASE and LOADBALANCER_SECRET with:
|
||||
|
||||
```
|
||||
sed -i "s/SECRET_KEY_BASE=.*/SECRET_KEY_BASE=$(openssl rand -hex 64)/" .env
|
||||
sed -i "s/LOADBALANCER_SECRET=.*/LOADBALANCER_SECRET=$(openssl rand -hex 24)/" .env
|
||||
```
|
||||
|
||||
Set the hostname on URL_HOST (E.g. scalelite.example.com)
|
||||
|
||||
When using a SSL certificate set NGINX_SSL to true
|
||||
|
||||
Your final .env file should look like this:
|
||||
|
||||
```
|
||||
SECRET_KEY_BASE=a7441a3548b9890a8f12b385854743f3101fd7fac9353f689fc4fa4f2df6cdcd1f58bdf6a02ca0d35a611b9063151d70986bad8123a73244abb2a11763847a45
|
||||
LOADBALANCER_SECRET=c2d3a8e27844d56060436f3129acd945d7531fe77e661716
|
||||
URL_HOST=scalelite.example.com
|
||||
NGINX_SSL=true
|
||||
```
|
||||
|
||||
For using a SSL certificate signed by Let’s Encrypt, generate the certificates.
|
||||
|
||||
```
|
||||
./init-letsencrypt.sh
|
||||
```
|
||||
|
||||
Start the services.
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
Now, the scalelite server is running, but it is not quite yet ready. The database must be initialized.
|
||||
|
||||
```
|
||||
docker exec -i scalelite-api bundle exec rake db:setup
|
||||
```
|
||||
|
||||
@@ -59,9 +59,9 @@ dynamic-hz yes
|
||||
rdb-save-incremental-fsync yes
|
||||
### TLS
|
||||
tls-port 7379
|
||||
tls-cert-file /etc/letsencrypt/archive/sl.jesus.123it.ca/cert3.pem
|
||||
tls-key-file /etc/letsencrypt/archive/sl.jesus.123it.ca/privkey3.pem
|
||||
tls-ca-cert-file /etc/letsencrypt/archive/sl.jesus.123it.ca/chain3.pem
|
||||
tls-cert-file /etc/letsencrypt/live/$HOSTNAME/cert.pem
|
||||
tls-key-file /etc/letsencrypt/live/$HOSTNAME/privkey.pem
|
||||
tls-ca-cert-file /etc/letsencrypt/live/$HOSTNAME/chain.pem
|
||||
tls-auth-clients no
|
||||
|
||||
# tls-auth-clients optional
|
||||
@@ -35,10 +35,9 @@ services:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis-data-dev:/data
|
||||
- ./data/redis/conf/redis.conf:/usr/local/etc/redis/redis.conf
|
||||
- ./data/redis/conf/redis.conf.template:/usr/local/etc/redis/redis.conf.template
|
||||
- ./data/certbot/conf/:/etc/letsencrypt
|
||||
# command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
command: /bin/sh -c "sed -e 's/$$HOSTNAME/redis.${DOMAIN_NAME:-xlab.blindside-dev.com}/' /usr/local/etc/redis/redis.conf.template > /usr/local/etc/redis/redis.conf && exec redis-server --appendonly yes"
|
||||
|
||||
certbot:
|
||||
image: certbot/certbot
|
||||
|
||||
@@ -21,9 +21,9 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
- ./data/redis/conf/redis.conf:/usr/local/etc/redis/redis.conf
|
||||
- ./data/redis/conf/redis.conf.template:/usr/local/etc/redis/redis.conf.template
|
||||
- ./data/certbot/conf/:/etc/letsencrypt
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
command: /bin/sh -c "sed -e 's/$$HOSTNAME/redis.${DOMAIN_NAME:-xlab.blindside-dev.com}/' /usr/local/etc/redis/redis.conf.template > /usr/local/etc/redis/redis.conf && exec redis-server --appendonly yes"
|
||||
|
||||
certbot:
|
||||
image: certbot/certbot:v1.11.0
|
||||
@@ -42,7 +42,7 @@ services:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
environment:
|
||||
- NGINX_HOSTNAME=${URL_HOST:-xlab.blindside-dev.com}
|
||||
- NGINX_HOSTNAME=${URL_HOST:-sl.xlab.blindside-dev.com}
|
||||
volumes:
|
||||
- ./log/proxy-nginx/:/var/log/nginx
|
||||
- ./data/proxy/nginx/sites.template.${DOCKER_PROXY_NGINX_TEMPLATE:-scalelite-proxy}:/etc/nginx/sites.template
|
||||
@@ -53,7 +53,8 @@ services:
|
||||
- certbot
|
||||
- scalelite-api
|
||||
- scalelite-recordings
|
||||
command: /bin/bash -c "envsubst '$$NGINX_HOSTNAME' < /etc/nginx/sites.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
|
||||
command: /bin/bash -c "envsubst '$$NGINX_HOSTNAME' < /etc/nginx/sites.template > /etc/nginx/conf.d/default.conf && while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g 'daemon off;'"
|
||||
|
||||
|
||||
scalelite-recordings:
|
||||
image: ${SCALELITE_RECORDINGS_DOCKER_IMAGE:-bigbluebutton/bbb-playback-proxy:bionic-240-alpine}
|
||||
|
||||
Reference in New Issue
Block a user