Updating for traefik

This commit is contained in:
Vivianne 2023-01-17 00:05:32 -05:00
parent c396ec0fd2
commit 4491901f53
2 changed files with 12 additions and 11 deletions

View File

@ -60,8 +60,10 @@ services:
restart: unless-stopped
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
networks:
- default
- mail
default:
aliases:
- funkwhale_api
mail:
depends_on:
- postgres
- redis
@ -84,11 +86,13 @@ services:
- api
env_file:
- .env
environment:
# Override those variables in your .env file if needed
- "NGINX_MAX_BODY_SIZE=${NGINX_MAX_BODY_SIZE-100M}"
- LETSENCRYPT_HOST=audio.solarpunk.moe
- VIRTUAL_HOST=audio.solarpunk.moe
labels:
- "traefik.enable=true"
- "traefik.http.services.funkwhale.loadbalancer.server.port=80"
- "traefik.http.routers.funkwhale.rule=Host(`audio.solarpunk.moe`)"
- "traefik.http.routers.funkwhale.tls.certresolver=leresolver"
- "traefik.http.routers.funkwhale.entrypoints=websecure"
volumes:
- "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
- "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro"
@ -96,9 +100,6 @@ services:
- "${MEDIA_ROOT}:${MEDIA_ROOT}:ro"
- "${STATIC_ROOT}:${STATIC_ROOT}:ro"
- "${FUNKWHALE_FRONTEND_PATH}:/frontend:ro"
ports:
# override those variables in your .env file if needed
- "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80"
command: >
sh -c "envsubst \"`env | awk -F = '{printf \" $$%s\", $$1}'`\"
< /etc/nginx/conf.d/funkwhale.template

View File

@ -1,6 +1,6 @@
upstream funkwhale-api {
# depending on your setup, you may want to update this
server api:5000;
server funkwhale_api:5000;
}