diff options
author | Kristofer Hallin <kristofer@sunet.se> | 2021-11-17 09:39:30 +0100 |
---|---|---|
committer | Kristofer Hallin <kristofer@sunet.se> | 2021-11-17 09:44:37 +0100 |
commit | fadb0f24bb55697a1ba34611a4288d12e25065d1 (patch) | |
tree | 75e2c197625d660baaa7c41ecab40575e68c1fbd /docker/collector | |
parent | bd5e9b5a7a188295d8731d560dff1e59c1587666 (diff) |
Use Uvicorn since we now run FastAPI which uses ASGI.
Diffstat (limited to 'docker/collector')
-rw-r--r-- | docker/collector/Dockerfile | 5 | ||||
-rw-r--r-- | docker/collector/nginx.conf | 3 | ||||
-rw-r--r-- | docker/collector/supervisord.conf | 5 | ||||
-rw-r--r-- | docker/collector/uwsgi.conf | 10 |
4 files changed, 6 insertions, 17 deletions
diff --git a/docker/collector/Dockerfile b/docker/collector/Dockerfile index 68514a7..6a9f5e9 100644 --- a/docker/collector/Dockerfile +++ b/docker/collector/Dockerfile @@ -3,7 +3,7 @@ FROM debian:bullseye ENV DEBIAN_FRONTEND noninteractive RUN apt update -RUN apt install -y git nginx supervisor uwsgi uwsgi-plugin-python3 emacs-nox virtualenv procps +RUN apt install -y git nginx supervisor emacs-nox virtualenv procps RUN apt clean WORKDIR /opt/ @@ -15,9 +15,8 @@ WORKDIR /opt/collector/ COPY setup.sh /opt/collector/ COPY supervisord.conf /etc/supervisor/ COPY nginx.conf /etc/nginx/sites-available/default -COPY uwsgi.conf /etc/uwsgi/uwsgi.ini -COPY wsgi_demo_users.yaml /opt/collector/src/ RUN /opt/collector/setup.sh ENTRYPOINT supervisord -c /etc/supervisor/supervisord.conf + diff --git a/docker/collector/nginx.conf b/docker/collector/nginx.conf index 8a816e4..adcb4da 100644 --- a/docker/collector/nginx.conf +++ b/docker/collector/nginx.conf @@ -6,8 +6,7 @@ server { error_log /var/log/nginx/error.log warn; location / { - include uwsgi_params; - uwsgi_pass uwsgi://localhost:8000; + proxy_pass http://localhost:8000; } }
\ No newline at end of file diff --git a/docker/collector/supervisord.conf b/docker/collector/supervisord.conf index f787c10..374f4fe 100644 --- a/docker/collector/supervisord.conf +++ b/docker/collector/supervisord.conf @@ -1,8 +1,9 @@ [supervisord] nodaemon=true -[program:uwsgi_internal] -command = /usr/bin/uwsgi --ini /etc/uwsgi/uwsgi.ini --plugin python3 +[program:uvicorn] +directory = /opt/collector/src/ +command = /opt/collector/venv/bin/uvicorn --proxy-headers --port 8000 wsgi:app stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr diff --git a/docker/collector/uwsgi.conf b/docker/collector/uwsgi.conf deleted file mode 100644 index 651274d..0000000 --- a/docker/collector/uwsgi.conf +++ /dev/null @@ -1,10 +0,0 @@ -[uwsgi] -chdir = /opt/collector/src/ -virtualenv = /opt/collector/venv/ -wsgi-file = wsgi.py -callable = app -socket = :8000 -master = true -enable-threads = true -processes = 4 -threads = 2
\ No newline at end of file |