Skip to content

Commit bc94d63

Browse files
committed
standardized docker-compose to 1 single image
1 parent 7ca9d06 commit bc94d63

File tree

7 files changed

+190
-89
lines changed

7 files changed

+190
-89
lines changed

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
/scalelite/tmp*
77

88
/data/*
9-
/data/proxy/nginx/log/*
10-
!/data/proxy/nginx/log/.keep
11-
/data/proxy/nginx/sites-enabled/*
12-
!/data/proxy/nginx/sites-enabled/.keep
9+
!/data/nginx/
1310
!/data/proxy/
11+
/data/redis/db/*
12+
!/data/redis/
1413

1514
/tmp*
1615

data/proxy/nginx/log/.keep

Whitespace-only changes.

data/proxy/nginx/sites.template.scalelite-local

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,39 +37,28 @@ server {
3737
#ssl_certificate /etc/ssl/fullchain.pem;
3838
#ssl_certificate_key /etc/ssl/privkey.pem;
3939

40-
location /bigbluebutton/api/ {
40+
location /health_check {
4141
proxy_pass http://docker-scalelite-api;
42+
include /etc/nginx/sites-common;
43+
}
4244

43-
proxy_read_timeout 60s;
44-
proxy_redirect off;
45-
46-
proxy_set_header Host $http_host;
47-
48-
proxy_set_header X-Real-IP $remote_addr;
49-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
50-
51-
proxy_set_header X-Forwarded-Proto $scheme;
52-
53-
proxy_http_version 1.1;
54-
proxy_set_header Upgrade $http_upgrade;
55-
proxy_set_header Connection "upgrade";
45+
location /bigbluebutton/api/ {
46+
proxy_pass http://docker-scalelite-api;
47+
include /etc/nginx/sites-common;
5648
}
5749

58-
location / {
50+
location /presentation/ {
5951
proxy_pass http://docker-scalelite-recordings;
52+
include /etc/nginx/sites-common;
53+
}
6054

61-
proxy_read_timeout 60s;
62-
proxy_redirect off;
63-
64-
proxy_set_header Host $http_host;
65-
66-
proxy_set_header X-Real-IP $remote_addr;
67-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
68-
69-
proxy_set_header X-Forwarded-Proto $scheme;
55+
location /playback/ {
56+
proxy_pass http://docker-scalelite-recordings;
57+
include /etc/nginx/sites-common;
58+
}
7059

71-
proxy_http_version 1.1;
72-
proxy_set_header Upgrade $http_upgrade;
73-
proxy_set_header Connection "upgrade";
60+
location / {
61+
proxy_pass http://docker-scalelite-api/health_check;
62+
include /etc/nginx/sites-common;
7463
}
7564
}

data/redis/conf/redis.conf

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
bind 0.0.0.0
2+
protected-mode no
3+
masterauth "redisTLSTest2021@@"
4+
requirepass "redisTLSTest2021@@"
5+
port 0
6+
tcp-backlog 511
7+
timeout 300
8+
tcp-keepalive 300
9+
daemonize no
10+
supervised no
11+
pidfile /var/run/redis.pid
12+
loglevel notice
13+
#logfile "/var/log/redis/redis.log"
14+
databases 16
15+
always-show-logo no
16+
stop-writes-on-bgsave-error yes
17+
rdbcompression yes
18+
rdbchecksum yes
19+
# The filename where to dump the DB
20+
dbfilename dump_6479.rdb
21+
replica-serve-stale-data yes
22+
replica-read-only yes
23+
repl-diskless-sync no
24+
repl-diskless-sync-delay 5
25+
repl-timeout 60
26+
repl-disable-tcp-nodelay no
27+
replica-priority 100
28+
maxclients 10000
29+
# maxmemory-policy noeviction
30+
lazyfree-lazy-eviction no
31+
lazyfree-lazy-expire no
32+
lazyfree-lazy-server-del no
33+
replica-lazy-flush no
34+
appendonly yes
35+
appendfilename "appendonly.aof"
36+
appendfsync everysec
37+
no-appendfsync-on-rewrite no
38+
auto-aof-rewrite-percentage 100
39+
auto-aof-rewrite-min-size 64mb
40+
aof-load-truncated yes
41+
aof-use-rdb-preamble yes
42+
lua-time-limit 5000
43+
cluster-config-file redis_cluster.conf
44+
cluster-node-timeout 15000
45+
cluster-enabled yes
46+
# cluster-replica-validity-factor 10
47+
# cluster-require-full-coverage yes
48+
slowlog-log-slower-than 10000
49+
slowlog-max-len 128
50+
latency-monitor-threshold 0
51+
notify-keyspace-events ""
52+
list-max-ziplist-size -2
53+
activerehashing yes
54+
client-output-buffer-limit normal 0 0 0
55+
client-output-buffer-limit replica 256mb 64mb 60
56+
client-output-buffer-limit pubsub 32mb 8mb 60
57+
hz 10
58+
dynamic-hz yes
59+
rdb-save-incremental-fsync yes
60+
### TLS
61+
tls-port 7379
62+
tls-cert-file /etc/letsencrypt/archive/sl.jesus.123it.ca/cert3.pem
63+
tls-key-file /etc/letsencrypt/archive/sl.jesus.123it.ca/privkey3.pem
64+
tls-ca-cert-file /etc/letsencrypt/archive/sl.jesus.123it.ca/chain3.pem
65+
tls-auth-clients no
66+
67+
# tls-auth-clients optional
68+
69+
tls-replication yes
70+
tls-cluster yes
71+
72+
# Explicitly specify TLS versions to support. Allowed values are case insensitive
73+
# and include "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3" (OpenSSL >= 1.1.1) or
74+
# any combination. To enable only TLSv1.2 and TLSv1.3, use:
75+
#
76+
tls-protocols "TLSv1.2 TLSv1.3"
77+
78+
# By default, TLS session caching is enabled to allow faster and less expensive
79+
# reconnections by clients that support it. Use the following directive to disable
80+
# caching.
81+
tls-session-caching no

docker-compose-dev.yml

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,26 @@ services:
2525
image: postgres:11-alpine
2626
container_name: postgres
2727
restart: unless-stopped
28-
volumes:
29-
- postgres-data-dev:/var/lib/postgresql/data
3028
ports:
3129
- "5432:5432"
3230
environment:
3331
- POSTGRES_USER=${POSTGRES_USER:-postgres}
3432
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
33+
volumes:
34+
- postgres-data-dev:/var/lib/postgresql/data
3535

3636
redis:
37-
image: redis:5.0-alpine
38-
command: ["redis-server", "--appendonly", "yes"]
37+
image: redis:6.2-alpine
3938
container_name: redis
4039
restart: unless-stopped
41-
volumes:
42-
- redis-data-dev:/data
4340
ports:
4441
- "6379:6379"
42+
volumes:
43+
- redis-data-dev:/data
44+
- ./data/redis/conf/redis.conf:/usr/local/etc/redis/redis.conf
45+
- ./data/certbot/conf/:/etc/letsencrypt
46+
# command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
47+
command: ["redis-server", "--appendonly", "yes"]
4548

4649
certbot:
4750
image: certbot/certbot
@@ -56,27 +59,25 @@ services:
5659
image: nginx:1.18
5760
container_name: scalelite-proxy
5861
restart: unless-stopped
59-
volumes:
60-
- ./data/proxy/nginx/log/:/var/log/nginx
61-
- ./data/proxy/nginx/sites.template.${DOCKER_PROXY_NGINX_TEMPLATE:-scalelite-proxy}:/etc/nginx/sites.template
62-
- ./data/proxy/nginx/sites-common:/etc/nginx/sites-common
63-
- ./data/certbot/conf/:/etc/letsencrypt
64-
- ./data/certbot/www/:/var/www/certbot
6562
ports:
6663
- "80:80"
6764
- "443:443"
6865
environment:
6966
- NGINX_HOSTNAME=${URL_HOST:-xlab.blindside-dev.com}
67+
volumes:
68+
- ./log/proxy-nginx/:/var/log/nginx
69+
- ./data/proxy/nginx/sites.template.${DOCKER_PROXY_NGINX_TEMPLATE:-scalelite-proxy}:/etc/nginx/sites.template
70+
- ./data/proxy/nginx/sites-common:/etc/nginx/sites-common
71+
- ./data/certbot/conf/:/etc/letsencrypt
72+
- ./data/certbot/www/:/var/www/certbot
7073
depends_on:
7174
- certbot
7275
- scalelite-api
7376
- scalelite-recordings
7477
command: /bin/bash -c "envsubst '$$NGINX_HOSTNAME' < /etc/nginx/sites.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
75-
logging:
76-
driver: journald
7778

7879
scalelite-recordings:
79-
image: bigbluebutton/bbb-playback-proxy:bionic-23-dev-alpine3.11
80+
image: ${SCALELITE_RECORDINGS_DOCKER_IMAGE:-bigbluebutton/bbb-playback-proxy:bionic-230-alpine}
8081
container_name: scalelite-recordings
8182
restart: unless-stopped
8283
volumes:
@@ -86,48 +87,56 @@ services:
8687
- scalelite-api
8788

8889
scalelite-api:
89-
image: ${SCALELITE_DOCKER_IMAGE:-blindsidenetwks/scalelite:v1.0}
90+
image: ${SCALELITE_DOCKER_IMAGE:-blindsidenetwks/scalelite:v1.1}
9091
container_name: scalelite-api
9192
restart: unless-stopped
92-
volumes:
93-
- ./log/scalelite/:/app/log
94-
- ${SCALELITE_RECORDING_DIR-/mnt/scalelite-recordings/var/bigbluebutton}:/var/bigbluebutton
93+
env_file:
94+
- .env
9595
environment:
96-
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
97-
- LOADBALANCER_SECRET=${LOADBALANCER_SECRET}
9896
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
9997
- DATABASE_URL=${DATABASE_URL:-postgres://postgres:password@postgres:5432/scalelite?pool=5}
10098
- RECORDING_DISABLED=${RECORDING_DISABLED-false}
10199
- SERVER_ID_IS_HOSTNAME=${SERVER_ID_IS_HOSTNAME-false}
100+
- RAILS_LOG_TO_STDOUT=${RAILS_LOG_TO_STDOUT}
101+
volumes:
102+
- ./log/scalelite-api/:/srv/scalelite/log/
103+
- ${SCALELITE_RECORDING_DIR-/mnt/scalelite-recordings/var/bigbluebutton}:/var/bigbluebutton
102104
depends_on:
103105
- postgres
104106
- redis
105107
logging:
106108
driver: journald
107109

108110
scalelite-poller:
109-
image: ${SCALELITE_DOCKER_IMAGE:-blindsidenetwks/scalelite:v1.0}
111+
image: ${SCALELITE_DOCKER_IMAGE:-blindsidenetwks/scalelite:v1.1}
110112
container_name: scalelite-poller
111113
restart: unless-stopped
114+
env_file:
115+
- .env
112116
environment:
113117
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
114-
- DATABASE_URL=${DATABASE_URL:-postgres://postgres:password@postgres:5432/scalelite?pool=5}
115118
- SERVER_ID_IS_HOSTNAME=${SERVER_ID_IS_HOSTNAME-false}
119+
- RAILS_LOG_TO_STDOUT=${RAILS_LOG_TO_STDOUT}
120+
volumes:
121+
- ./log/scalelite-poller/:/app/log
116122
command: /bin/sh -c "bin/start-poller"
117123
depends_on:
118124
- scalelite-api
119125
logging:
120126
driver: journald
121127

122128
scalelite-recording-importer:
123-
image: ${SCALELITE_DOCKER_IMAGE:-blindsidenetwks/scalelite:v1.0}
129+
image: ${SCALELITE_DOCKER_IMAGE:-blindsidenetwks/scalelite:v1.1}
124130
container_name: scalelite-recording-importer
125131
restart: unless-stopped
132+
env_file:
133+
- .env
126134
environment:
127-
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
128135
- DATABASE_URL=${DATABASE_URL:-postgres://postgres:password@postgres:5432/scalelite?pool=5}
129136
- RECORDING_DISABLED=false
137+
- RAILS_LOG_TO_STDOUT=${RAILS_LOG_TO_STDOUT}
130138
volumes:
139+
- ./log/scalelite-recording-importer/:/app/log
131140
- ${SCALELITE_RECORDING_DIR-/mnt/scalelite-recordings/var/bigbluebutton}:/var/bigbluebutton
132141
- ${SCALELITE_RECORDING_DIR-/mnt/scalelite-recordings/var/bigbluebutton}/spool:/var/bigbluebutton/spool
133142
command: /bin/sh -c "bin/start-recording-importer"

0 commit comments

Comments
 (0)