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
|
||||
# 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_tv ssl_fc_sni -i "tv.${BASE_URL}"
|
||||
|
||||
# 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
|
||||
|
||||
backend backend_api
|
||||
balance leastconn
|
||||
server api1 api:8080 check inter 5s rise 4 fall 2
|
||||
use_backend backend_scheduler if is_tv
|
||||
|
||||
backend backend_restreamer
|
||||
balance leastconn
|
||||
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:
|
||||
- "certbot"
|
||||
- "restreamer"
|
||||
- "api"
|
||||
- "scheduler"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- net
|
||||
|
@ -55,25 +55,25 @@ services:
|
|||
labels:
|
||||
- meta.role=restreamer
|
||||
|
||||
api:
|
||||
scheduler:
|
||||
depends_on:
|
||||
- "restreamer"
|
||||
build: ./src/api
|
||||
image: tv-api:latest
|
||||
build: ./src/scheduler
|
||||
image: tv-scheduler:latest
|
||||
env_file:
|
||||
- "variables.env"
|
||||
volumes:
|
||||
- "./config/api:/config"
|
||||
- "./config/scheduler:/config"
|
||||
- "./data/recorder:/recordings"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- net
|
||||
labels:
|
||||
- meta.role=api
|
||||
- meta.role=scheduler
|
||||
|
||||
discordbot:
|
||||
depends_on:
|
||||
- "api"
|
||||
- "scheduler"
|
||||
build: ./src/discordbot
|
||||
image: tv-discordbot:latest
|
||||
env_file:
|
||||
|
|
|
@ -7,8 +7,8 @@ CB=`docker ps | grep certbot | cut -d ' ' -f 1`
|
|||
#echo $BASE_URL
|
||||
#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 \
|
||||
-d $BASE_URL -d api.$BASE_URL -d stream.$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 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
|
||||
|
|
|
@ -19,4 +19,4 @@ COPY . .
|
|||
|
||||
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