Compare commits

..

2 commits

Author SHA1 Message Date
f2a6d186c8 rename the scheduler service to api 2024-09-07 14:40:06 +00:00
5822fa8235 rename scheduler container to api 2024-09-05 17:05:23 +00:00
11 changed files with 19 additions and 16 deletions

View file

@ -62,17 +62,20 @@ 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

View file

@ -18,7 +18,7 @@ services:
depends_on: depends_on:
- "certbot" - "certbot"
- "restreamer" - "restreamer"
- "scheduler" - "api"
restart: unless-stopped restart: unless-stopped
networks: networks:
- net - net
@ -55,25 +55,25 @@ services:
labels: labels:
- meta.role=restreamer - meta.role=restreamer
scheduler: api:
depends_on: depends_on:
- "restreamer" - "restreamer"
build: ./src/scheduler build: ./src/api
image: tv-scheduler:latest image: tv-api:latest
env_file: env_file:
- "variables.env" - "variables.env"
volumes: volumes:
- "./config/scheduler:/config" - "./config/api:/config"
- "./data/recorder:/recordings" - "./data/recorder:/recordings"
restart: unless-stopped restart: unless-stopped
networks: networks:
- net - net
labels: labels:
- meta.role=scheduler - meta.role=api
discordbot: discordbot:
depends_on: depends_on:
- "scheduler" - "api"
build: ./src/discordbot build: ./src/discordbot
image: tv-discordbot:latest image: tv-discordbot:latest
env_file: env_file:

View 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 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 $BASE_URL \
-d tv.$BASE_URL -d stream.$BASE_URL -d $BASE_URL -d api.$BASE_URL -d stream.$BASE_URL
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" cat "./data/certbot/etc/live/$BASE_URL/privkey.pem" "./data/certbot/etc/live/$BASE_URL/fullchain.pem" > "./data/certificates/$BASE_URL.pem"
docker kill -s USR2 television_haproxy_1 docker kill -s USR2 television_haproxy_1

View file

@ -19,4 +19,4 @@ COPY . .
EXPOSE 8080 EXPOSE 8080
CMD [ "waitress-serve", "--port=8080", "--call", "scheduler:create_app"] CMD [ "waitress-serve", "--port=8080", "--call", "api:create_app"]

View file

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB