Compare commits
No commits in common. "f2a6d186c82bca1d7b776fb88839acf3e2113301" and "dcba53a20e1b47068ce64cf7b134455a0bf71ed2" have entirely different histories.
f2a6d186c8
...
dcba53a20e
11 changed files with 16 additions and 19 deletions
|
@ -62,20 +62,17 @@ frontend https
|
||||||
|
|
||||||
# Router
|
# Router
|
||||||
# ACL to match the sni hosts
|
# ACL to match the sni hosts
|
||||||
acl is_base ssl_fc_sni -i "${BASE_URL}"
|
|
||||||
acl is_api ssl_fc_sni -i "api.${BASE_URL}"
|
|
||||||
acl is_stream ssl_fc_sni -i "stream.${BASE_URL}"
|
acl is_stream ssl_fc_sni -i "stream.${BASE_URL}"
|
||||||
|
acl is_tv ssl_fc_sni -i "tv.${BASE_URL}"
|
||||||
|
|
||||||
# Define the ACL conditions and corresponding actions
|
# Define the ACL conditions and corresponding actions
|
||||||
use_backend backend_api if is_base
|
|
||||||
use_backend backend_api if is_api
|
|
||||||
use_backend backend_restreamer if is_stream
|
use_backend backend_restreamer if is_stream
|
||||||
|
use_backend backend_scheduler if is_tv
|
||||||
backend backend_api
|
|
||||||
balance leastconn
|
|
||||||
server api1 api:8080 check inter 5s rise 4 fall 2
|
|
||||||
|
|
||||||
backend backend_restreamer
|
backend backend_restreamer
|
||||||
balance leastconn
|
balance leastconn
|
||||||
server restreamer1 restreamer:8080 check inter 5s rise 4 fall 2
|
server restreamer1 restreamer:8080 check inter 5s rise 4 fall 2
|
||||||
|
|
||||||
|
backend backend_scheduler
|
||||||
|
balance leastconn
|
||||||
|
server scheduler1 scheduler:8080 check inter 5s rise 4 fall 2
|
||||||
|
|
|
@ -18,7 +18,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- "certbot"
|
- "certbot"
|
||||||
- "restreamer"
|
- "restreamer"
|
||||||
- "api"
|
- "scheduler"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
|
@ -55,25 +55,25 @@ services:
|
||||||
labels:
|
labels:
|
||||||
- meta.role=restreamer
|
- meta.role=restreamer
|
||||||
|
|
||||||
api:
|
scheduler:
|
||||||
depends_on:
|
depends_on:
|
||||||
- "restreamer"
|
- "restreamer"
|
||||||
build: ./src/api
|
build: ./src/scheduler
|
||||||
image: tv-api:latest
|
image: tv-scheduler:latest
|
||||||
env_file:
|
env_file:
|
||||||
- "variables.env"
|
- "variables.env"
|
||||||
volumes:
|
volumes:
|
||||||
- "./config/api:/config"
|
- "./config/scheduler:/config"
|
||||||
- "./data/recorder:/recordings"
|
- "./data/recorder:/recordings"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
labels:
|
labels:
|
||||||
- meta.role=api
|
- meta.role=scheduler
|
||||||
|
|
||||||
discordbot:
|
discordbot:
|
||||||
depends_on:
|
depends_on:
|
||||||
- "api"
|
- "scheduler"
|
||||||
build: ./src/discordbot
|
build: ./src/discordbot
|
||||||
image: tv-discordbot:latest
|
image: tv-discordbot:latest
|
||||||
env_file:
|
env_file:
|
||||||
|
|
|
@ -7,8 +7,8 @@ CB=`docker ps | grep certbot | cut -d ' ' -f 1`
|
||||||
#echo $BASE_URL
|
#echo $BASE_URL
|
||||||
#echo $EMAIL
|
#echo $EMAIL
|
||||||
|
|
||||||
docker exec $CB certbot certonly --non-interactive --standalone --http-01-address 0.0.0.0 --email $EMAIL --agree-tos --keep --preferred-challenges http --cert-name $BASE_URL \
|
docker exec $CB certbot certonly --non-interactive --standalone --http-01-address 0.0.0.0 --email $EMAIL --agree-tos --keep --preferred-challenges http --cert-name stream.$BASE_URL \
|
||||||
-d $BASE_URL -d api.$BASE_URL -d stream.$BASE_URL
|
-d tv.$BASE_URL -d stream.$BASE_URL
|
||||||
|
|
||||||
cat "./data/certbot/etc/live/$BASE_URL/privkey.pem" "./data/certbot/etc/live/$BASE_URL/fullchain.pem" > "./data/certificates/$BASE_URL.pem"
|
cat "./data/certbot/etc/live/stream.$BASE_URL/privkey.pem" "./data/certbot/etc/live/stream.$BASE_URL/fullchain.pem" > "./data/certificates/stream.$BASE_URL.pem"
|
||||||
docker kill -s USR2 television_haproxy_1
|
docker kill -s USR2 television_haproxy_1
|
||||||
|
|
|
@ -19,4 +19,4 @@ COPY . .
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
CMD [ "waitress-serve", "--port=8080", "--call", "api:create_app"]
|
CMD [ "waitress-serve", "--port=8080", "--call", "scheduler:create_app"]
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Loading…
Reference in a new issue