diff --git a/makefile b/makefile index 215df7e..8d50a87 100644 --- a/makefile +++ b/makefile @@ -49,6 +49,14 @@ deploy-apps: pull set +a ;\ docker stack deploy --compose-file ./swarm/apps.yml apps ;\ } +deploy-secondary: pull + { \ + echo "Deploying the secondary stack..." ;\ + set -a ;\ + . ./swarm/.env ;\ + set +a ;\ + docker stack deploy --compose-file ./swarm/secondary.yml secondary ;\ + } deploy-ghost: pull { \ diff --git a/swarm/librechat.yml b/swarm/librechat.yml index 4ea06d4..5cf6227 100644 --- a/swarm/librechat.yml +++ b/swarm/librechat.yml @@ -34,12 +34,12 @@ services: - DOMAIN=${DOMAIN} volumes: - type: bind - source: ~/config/.env + source: /var/data/config/.env target: /app/.env - libre-images:/app/client/public/images - libre-logs:/app/api/logs - type: bind - source: ~/config/librechat.yaml + source: /var/data/config/librechat.yaml target: /app/librechat.yaml networks: - net diff --git a/swarm/secondary.yml b/swarm/secondary.yml new file mode 100644 index 0000000..9436e95 --- /dev/null +++ b/swarm/secondary.yml @@ -0,0 +1,26 @@ +services: + librespeed: + image: lscr.io/linuxserver/librespeed:latest + container_name: librespeed + environment: + - PUID=1000 + - PGID=1000 + - TZ=${TZ} + - PASSWORD=${DATABASE__PASSWORD} + volumes: + - /var/data/config/librespeed:/config + # ports: + # - 80:80 + restart: unless-stopped + networks: + - traefik-public + deploy: + labels: + - "traefik.enable=true" + - traefik.docker.network=traefik-public + - traefik.constraint-label=traefik-public + - traefik.http.routers.librespeed.entrypoints=https + - traefik.http.routers.librespeed.rule=Host(`speed.${DOMAIN}`) || Host(`speedtest.${DOMAIN}`) + - traefik.http.routers.librespeed.tls.certresolver=le + - traefik.http.routers.librespeed.service=librespeed_app + - traefik.http.services.librespeed_app.loadbalancer.server.port=80 \ No newline at end of file