Fix run-nginx script when initiated from a windows machine

This commit is contained in:
Weves 2024-02-08 14:09:13 -08:00 committed by Chris Weaver
parent 1a1c91a7d9
commit 81f53ff3d8
3 changed files with 15 additions and 3 deletions

View File

@ -224,7 +224,11 @@ services:
# the specified script waits for the api_server to start up.
# Without this we've seen issues where nginx shows no error logs but
# does not recieve any traffic
command: "/bin/sh -c \"/etc/nginx/conf.d/run-nginx.sh app.conf.template.dev\""
# NOTE: we have to use dos2unix to remove Carriage Return chars from the file
# in order to make this work on both Unix-like systems and windows
command: >
/bin/sh -c "dos2unix /etc/nginx/conf.d/run-nginx.sh
&& /etc/nginx/conf.d/run-nginx.sh app.conf.template.dev"
# Run with --profile model-server to bring up the danswer-model-server container
# Be sure to change MODEL_SERVER_HOST (see above) as well
# ie. MODEL_SERVER_HOST="model_server" docker compose -f docker-compose.dev.yml -p danswer-stack --profile model-server up -d --build

View File

@ -125,7 +125,11 @@ services:
# the specified script waits for the api_server to start up.
# Without this we've seen issues where nginx shows no error logs but
# does not recieve any traffic
command: "/bin/sh -c \"/etc/nginx/conf.d/run-nginx.sh app.conf.template.no-letsencrypt\""
# NOTE: we have to use dos2unix to remove Carriage Return chars from the file
# in order to make this work on both Unix-like systems and windows
command: >
/bin/sh -c "dos2unix /etc/nginx/conf.d/run-nginx.sh
&& /etc/nginx/conf.d/run-nginx.sh app.conf.template.no-letsencrypt"
env_file:
- .env.nginx
# Run with --profile model-server to bring up the danswer-model-server container

View File

@ -129,7 +129,11 @@ services:
# the specified script waits for the api_server to start up.
# Without this we've seen issues where nginx shows no error logs but
# does not recieve any traffic
command: "/bin/sh -c \"/etc/nginx/conf.d/run-nginx.sh app.conf.template\""
# NOTE: we have to use dos2unix to remove Carriage Return chars from the file
# in order to make this work on both Unix-like systems and windows
command: >
/bin/sh -c "dos2unix /etc/nginx/conf.d/run-nginx.sh
&& /etc/nginx/conf.d/run-nginx.sh app.conf.template"
env_file:
- .env.nginx
# follows https://pentacent.medium.com/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71