From 18c9c2b745f9a07d13d22400516ecba968f8495f Mon Sep 17 00:00:00 2001 From: Akshay Sasidharan Date: Wed, 24 May 2023 13:29:02 +0530 Subject: [PATCH 1/3] fix keyring add permission issue --- docker/try-tooljet.Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/try-tooljet.Dockerfile b/docker/try-tooljet.Dockerfile index 7782071dbc..04fc64557b 100644 --- a/docker/try-tooljet.Dockerfile +++ b/docker/try-tooljet.Dockerfile @@ -1,5 +1,6 @@ FROM tooljet/tooljet-ce:latest - +# Switch to root user +USER root # copy postgrest executable COPY --from=postgrest/postgrest:v10.1.1.20221215 /bin/postgrest /bin @@ -11,7 +12,6 @@ RUN apt update && apt -y install postgresql-13 postgresql-client-13 supervisor USER postgres RUN service postgresql start && \ psql -c "create role tooljet with login superuser password 'postgres';" -USER root RUN echo "[supervisord] \n" \ "nodaemon=true \n" \ @@ -33,6 +33,7 @@ RUN echo "[supervisord] \n" \ # ENV defaults ENV TOOLJET_HOST=http://localhost \ PORT=80 \ + NODE_ENV=production \ LOCKBOX_MASTER_KEY=replace_with_lockbox_master_key \ SECRET_KEY_BASE=replace_with_secret_key_base \ PG_DB=tooljet_production \ From b0de6a94a814162103f56e38398fdb222ad6f1e2 Mon Sep 17 00:00:00 2001 From: Akshay Sasidharan Date: Wed, 24 May 2023 13:45:42 +0530 Subject: [PATCH 2/3] set user --- docker/try-tooljet.Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/try-tooljet.Dockerfile b/docker/try-tooljet.Dockerfile index 04fc64557b..0e397bed0e 100644 --- a/docker/try-tooljet.Dockerfile +++ b/docker/try-tooljet.Dockerfile @@ -1,10 +1,10 @@ FROM tooljet/tooljet-ce:latest -# Switch to root user -USER root + # copy postgrest executable COPY --from=postgrest/postgrest:v10.1.1.20221215 /bin/postgrest /bin # Install Postgres +USER root RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list RUN echo "deb http://deb.debian.org/debian" @@ -12,6 +12,7 @@ RUN apt update && apt -y install postgresql-13 postgresql-client-13 supervisor USER postgres RUN service postgresql start && \ psql -c "create role tooljet with login superuser password 'postgres';" +USER root RUN echo "[supervisord] \n" \ "nodaemon=true \n" \ From f85abdd01940c90eca73aa312de9403db1d0fa03 Mon Sep 17 00:00:00 2001 From: Akshay Sasidharan Date: Wed, 24 May 2023 15:55:52 +0530 Subject: [PATCH 3/3] define home dir in env for npm --- docker/try-tooljet.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/try-tooljet.Dockerfile b/docker/try-tooljet.Dockerfile index 0e397bed0e..695f17b913 100644 --- a/docker/try-tooljet.Dockerfile +++ b/docker/try-tooljet.Dockerfile @@ -51,6 +51,7 @@ ENV TOOLJET_HOST=http://localhost \ PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj \ ORM_LOGGING=true \ DEPLOYMENT_PLATFORM=docker:local \ + HOME=/home/appuser \ TERM=xterm # Prepare DB and start application