From 2f036cdc62d99801299f3bc576efa056679836a5 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Wed, 26 Jun 2024 18:29:24 +0530 Subject: [PATCH] fixes to app images --- aio/Dockerfile-app | 4 ++++ aio/aio.sh | 6 ++++++ aio/env.sh | 4 ++++ aio/pg-setup.sh | 2 +- aio/postgresql.conf | 2 +- aio/supervisord-full-base | 2 +- 6 files changed, 17 insertions(+), 3 deletions(-) diff --git a/aio/Dockerfile-app b/aio/Dockerfile-app index 2645fe4375e..2f17e72fe51 100644 --- a/aio/Dockerfile-app +++ b/aio/Dockerfile-app @@ -144,6 +144,10 @@ RUN sed -i 's/PGHOST/POSTGRES_HOST/g' /app/plane.env && \ sed -i 's/plane-redis/localhost/g' /app/plane.env && \ sed -i 's/plane-minio/localhost/g' /app/plane.env +RUN set -o allexport && \ + source /app/plane.env set && \ + set +o allexport + COPY ./aio/nginx.conf /etc/nginx/nginx.conf.template # if build type is full, run the below copy pg-setup.sh diff --git a/aio/aio.sh b/aio/aio.sh index e68efbe535e..8ca14370618 100644 --- a/aio/aio.sh +++ b/aio/aio.sh @@ -1,6 +1,12 @@ #!/bin/bash set -e +set -o allexport +source plane.env set +set +o allexport + +export REDIS_URL="redis://$REDIS_HOST:$REDIS_PORT" + if [ "$1" = 'api' ]; then cd /app/api exec ./bin/docker-entrypoint-api.sh diff --git a/aio/env.sh b/aio/env.sh index dbd59d5b7cd..647f15a2426 100644 --- a/aio/env.sh +++ b/aio/env.sh @@ -1,5 +1,9 @@ #!/bin/sh +set -o allexport +source /app/plane.env set +set +o allexport + export dollar="$" export http_upgrade="http_upgrade" export scheme="scheme" diff --git a/aio/pg-setup.sh b/aio/pg-setup.sh index 767ea560bbf..c0f968e5f5b 100644 --- a/aio/pg-setup.sh +++ b/aio/pg-setup.sh @@ -4,7 +4,7 @@ if [ "$BUILD_TYPE" == "full" ]; then # Variables set -o allexport - source plane.env set + source /app/plane.env set set +o allexport export PGHOST=localhost diff --git a/aio/postgresql.conf b/aio/postgresql.conf index 3a650362b8d..ffe9d4a811d 100644 --- a/aio/postgresql.conf +++ b/aio/postgresql.conf @@ -802,7 +802,7 @@ default_text_search_config = 'pg_catalog.english' # default postgresql.conf. Note that these are directives, not variable # assignments, so they can usefully be given more than once. -include_dir = 'conf.d' # include files ending in '.conf' from +# include_dir = 'conf.d' # include files ending in '.conf' from # a directory, e.g., 'conf.d' #include_if_exists = '...' # include file only if it exists #include = '...' # include file diff --git a/aio/supervisord-full-base b/aio/supervisord-full-base index e868bc86dbc..0a6c27e13a1 100644 --- a/aio/supervisord-full-base +++ b/aio/supervisord-full-base @@ -14,7 +14,7 @@ stdout_logfile=/app/logs/access/redis.log [program:postgresql] user=postgres -command=/usr/lib/postgresql/15/bin/postgres --config-file=/etc/postgresql/15/main/postgresql.conf +command=/usr/lib/postgresql/15/bin/postgres --config-file=/etc/postgresql/postgresql.conf autostart=true autorestart=true stderr_logfile=/app/logs/error/postgresql.err.log