From 14e129a3c9c0925fcb25abf99ff6ff770435eabb Mon Sep 17 00:00:00 2001 From: Kumaran Rajendhiran Date: Tue, 12 Nov 2024 04:44:21 +0000 Subject: [PATCH] Update cookiecutter generated files --- .../fastapi/my_fastagency_app/docker/Dockerfile | 11 +++++++++-- .../docker/content/nginx.conf.template | 1 - .../fastapi/my_fastagency_app/pyproject.toml | 1 - .../mesop/my_fastagency_app/docker/Dockerfile | 11 +++++++++-- .../docker/content/nginx.conf.template | 1 - .../mesop/my_fastagency_app/pyproject.toml | 1 - .../my_fastagency_app/docker/Dockerfile | 11 +++++++++-- .../docker/content/nginx.conf.template | 1 - .../nats_n_fastapi/my_fastagency_app/pyproject.toml | 1 - 9 files changed, 27 insertions(+), 12 deletions(-) diff --git a/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/Dockerfile b/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/Dockerfile index d2c2ef95..a2a3e74f 100644 --- a/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/Dockerfile +++ b/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/Dockerfile @@ -18,11 +18,18 @@ RUN pip install --upgrade pip && pip install --no-cache-dir -e "." RUN adduser --disabled-password --gecos '' appuser \ && chown -R appuser /app \ && chown -R appuser:appuser /etc/nginx/conf.d /var/log/nginx /var/lib/nginx \ - && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid + && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid \ + # Allow binding to ports > 1024 without root + && sed -i 's/listen 80/listen 9999/g' /etc/nginx/sites-available/default \ + && sed -i 's/listen \[::\]:80/listen \[::\]:9999/g' /etc/nginx/sites-available/default \ + # Create required directories with correct permissions + && mkdir -p /var/cache/nginx /var/run \ + && chown -R appuser:appuser /var/cache/nginx /var/run USER appuser -EXPOSE 8000 8008 8888 +# ToDo: Fix exposing ports +# EXPOSE 8000 8008 8888 CMD ["/app/run_fastagency.sh"] diff --git a/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/content/nginx.conf.template b/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/content/nginx.conf.template index 7279f13c..c55a5bc4 100644 --- a/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/content/nginx.conf.template +++ b/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/content/nginx.conf.template @@ -19,7 +19,6 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; proxy_buffering off; diff --git a/docs/docs_src/getting_started/fastapi/my_fastagency_app/pyproject.toml b/docs/docs_src/getting_started/fastapi/my_fastagency_app/pyproject.toml index 66115547..f08787cc 100644 --- a/docs/docs_src/getting_started/fastapi/my_fastagency_app/pyproject.toml +++ b/docs/docs_src/getting_started/fastapi/my_fastagency_app/pyproject.toml @@ -9,7 +9,6 @@ name = "my_fastagency_app" dependencies = [ "fastagency[autogen,mesop,server,fastapi]>=0.3.0", - ] [project.optional-dependencies] diff --git a/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/Dockerfile b/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/Dockerfile index edce91fe..6c48bf49 100644 --- a/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/Dockerfile +++ b/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/Dockerfile @@ -18,11 +18,18 @@ RUN pip install --upgrade pip && pip install --no-cache-dir -e "." RUN adduser --disabled-password --gecos '' appuser \ && chown -R appuser /app \ && chown -R appuser:appuser /etc/nginx/conf.d /var/log/nginx /var/lib/nginx \ - && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid + && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid \ + # Allow binding to ports > 1024 without root + && sed -i 's/listen 80/listen 9999/g' /etc/nginx/sites-available/default \ + && sed -i 's/listen \[::\]:80/listen \[::\]:9999/g' /etc/nginx/sites-available/default \ + # Create required directories with correct permissions + && mkdir -p /var/cache/nginx /var/run \ + && chown -R appuser:appuser /var/cache/nginx /var/run USER appuser -EXPOSE 8000 8008 8888 +# ToDo: Fix exposing ports +# EXPOSE 8000 8008 8888 CMD ["/app/run_fastagency.sh"] diff --git a/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/content/nginx.conf.template b/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/content/nginx.conf.template index 7279f13c..c55a5bc4 100644 --- a/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/content/nginx.conf.template +++ b/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/content/nginx.conf.template @@ -19,7 +19,6 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; proxy_buffering off; diff --git a/docs/docs_src/getting_started/mesop/my_fastagency_app/pyproject.toml b/docs/docs_src/getting_started/mesop/my_fastagency_app/pyproject.toml index f80f72a8..b273485d 100644 --- a/docs/docs_src/getting_started/mesop/my_fastagency_app/pyproject.toml +++ b/docs/docs_src/getting_started/mesop/my_fastagency_app/pyproject.toml @@ -9,7 +9,6 @@ name = "my_fastagency_app" dependencies = [ "fastagency[autogen,mesop,server]>=0.3.0", - ] [project.optional-dependencies] diff --git a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/Dockerfile b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/Dockerfile index 068e4c1e..f2fa97bc 100644 --- a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/Dockerfile +++ b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/Dockerfile @@ -18,11 +18,18 @@ RUN pip install --upgrade pip && pip install --no-cache-dir -e "." RUN adduser --disabled-password --gecos '' appuser \ && chown -R appuser /app \ && chown -R appuser:appuser /etc/nginx/conf.d /var/log/nginx /var/lib/nginx \ - && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid + && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid \ + # Allow binding to ports > 1024 without root + && sed -i 's/listen 80/listen 9999/g' /etc/nginx/sites-available/default \ + && sed -i 's/listen \[::\]:80/listen \[::\]:9999/g' /etc/nginx/sites-available/default \ + # Create required directories with correct permissions + && mkdir -p /var/cache/nginx /var/run \ + && chown -R appuser:appuser /var/cache/nginx /var/run USER appuser -EXPOSE 8000 8008 8888 +# ToDo: Fix exposing ports +# EXPOSE 8000 8008 8888 CMD ["/app/run_fastagency.sh"] diff --git a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/content/nginx.conf.template b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/content/nginx.conf.template index 7279f13c..c55a5bc4 100644 --- a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/content/nginx.conf.template +++ b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/content/nginx.conf.template @@ -19,7 +19,6 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; proxy_buffering off; diff --git a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/pyproject.toml b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/pyproject.toml index 5dc9bea9..8f8ffc5c 100644 --- a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/pyproject.toml +++ b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/pyproject.toml @@ -9,7 +9,6 @@ name = "my_fastagency_app" dependencies = [ "fastagency[autogen,mesop,server,fastapi,nats]>=0.3.0", - ] [project.optional-dependencies]