fix: bind http

This commit is contained in:
Felix Spöttel
2023-03-15 13:44:17 +01:00
parent e7c6b55782
commit 52ce148605
3 changed files with 20 additions and 16 deletions

View File

@@ -19,3 +19,6 @@ test:
run:
docker compose -f docker-compose.base.yml -f docker-compose.prod.yml build
docker compose -f docker-compose.base.yml -f docker-compose.prod.yml up --remove-orphans
stop:
docker compose -f docker-compose.base.yml -f docker-compose.prod.yml down

View File

@@ -4,23 +4,24 @@ services:
traefik:
container_name: whisperbox-transcribe_traefik
ports:
- "443:443"
- "80:80"
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=whisperbox-transcribe_traefik"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.le.acme.email=${TRAEFIK_SSLEMAIL}"
- "--certificatesresolvers.le.acme.storage=./acme.json"
- "--certificatesresolvers.le.acme.tlschallenge=true"
- "--entrypoints.web.address=:80"
# - "--certificatesresolvers.le.acme.email=${TRAEFIK_SSLEMAIL}"
# - "--certificatesresolvers.le.acme.storage=./acme.json"
# - "--certificatesresolvers.le.acme.tlschallenge=true"
labels:
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.tls.certresolver=le"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
# - "traefik.http.routers.traefik.tls=true"
# - "traefik.http.routers.traefik.tls.certresolver=le"
- "traefik.http.routers.traefik.entrypoints=web"
# - "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
# - "traefik.http.routers.http-catchall.entrypoints=web"
# - "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
redis:
@@ -52,9 +53,9 @@ services:
- "traefik.enable=true"
- "traefik.http.services.web.loadbalancer.server.port=8000"
- "traefik.http.routers.web.rule=(Host(`${TRAEFIK_DOMAIN}`))"
- "traefik.http.routers.web.entrypoints=websecure"
- "traefik.http.routers.web.tls=true"
- "traefik.http.routers.web.tls.certresolver=le"
- "traefik.http.routers.web.entrypoints=web"
# - "traefik.http.routers.web.tls=true"
# - "traefik.http.routers.web.tls.certresolver=le"
volumes:
whisperbox-transcribe-data:

View File

@@ -20,4 +20,4 @@ COPY alembic.ini .
ENV VIRTUAL_ENV /opt/venv
ENV PATH /opt/venv/bin:$PATH
CMD alembic upgrade head && gunicorn -k uvicorn.workers.UvicornWorker app.web.main:app --bind ${HOST:-0.0.0.0}:${PORT:-8000} --log-level info --proxy-headers
CMD alembic upgrade head && uvicorn app.web.main:app --host ${HOST:-0.0.0.0} --port ${PORT:-8000} --log-level info --workers 4 --proxy-head>