diff --git a/Dockerfile b/Dockerfile index 6dfbff46..3aa93b0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ COPY ./tubearchivist/requirements.txt /requirements.txt RUN pip install --no-cache-dir -r requirements.txt --src /usr/local/src # copy config files -COPY docker_assets/nginx.conf /etc/nginx/conf.d/ +COPY docker_assets/nginx.conf /etc/nginx/sites-available/default # copy application into container COPY ./tubearchivist /app diff --git a/docker_assets/nginx.conf b/docker_assets/nginx.conf index 2bf32410..e134a8e7 100644 --- a/docker_assets/nginx.conf +++ b/docker_assets/nginx.conf @@ -1,30 +1,29 @@ server { listen 8000; - + location /cache/videos/ { alias /cache/videos/; } - + location /cache/channels/ { alias /cache/channels/; } - + location /cache/playlists/ { alias /cache/playlists/; } - + location /media/ { alias /youtube/; - types { text/vtt vtt; } } - + location / { include uwsgi_params; uwsgi_pass localhost:8080; } - + } \ No newline at end of file diff --git a/docker_assets/run.sh b/docker_assets/run.sh index 747548cc..31022c79 100644 --- a/docker_assets/run.sh +++ b/docker_assets/run.sh @@ -15,11 +15,11 @@ done # ugly nginx and uwsgi port overwrite with env vars if [[ -n "$TA_PORT" ]]; then - sed -i "s/8000/$TA_PORT/g" /etc/nginx/conf.d/nginx.conf + sed -i "s/8000/$TA_PORT/g" /etc/nginx/sites-available/default fi if [[ -n "$TA_UWSGI_PORT" ]]; then - sed -i "s/8080/$TA_UWSGI_PORT/g" /etc/nginx/conf.d/nginx.conf + sed -i "s/8080/$TA_UWSGI_PORT/g" /etc/nginx/sites-available/default sed -i "s/8080/$TA_UWSGI_PORT/g" /app/uwsgi.ini fi