From d03f11b4afd806a84dcb2200421fd2ecb6027356 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Sun, 26 May 2024 18:10:17 +0100 Subject: [PATCH] To hell with it --- stack/base-with-services/Dockerfile | 7 ++++--- stack/full-stack/Dockerfile | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/stack/base-with-services/Dockerfile b/stack/base-with-services/Dockerfile index 0e5eab0c..d941153d 100644 --- a/stack/base-with-services/Dockerfile +++ b/stack/base-with-services/Dockerfile @@ -9,10 +9,11 @@ WORKDIR /opt/ ARG AIIDA_VERSION ARG PGSQL_VERSION ARG TARGETARCH + # Location of the Postgresql DB -# This variable is automatically picked up by initdb -ARG PGDATA_FOLDER=/home/${NB_USER}/.postgresql -ENV PGDATA=${PGDATA_FOLDER} +# This variable is automatically picked up by initdb and pg_ctl +# WARNING: If you change this, you have to change it in full-stack as well! +ENV PGDATA=/home/${NB_USER}/.postgresql # Install RabbitMQ and PostgreSQL in a dedicated conda environment. # diff --git a/stack/full-stack/Dockerfile b/stack/full-stack/Dockerfile index 5f684a02..2a10f234 100644 --- a/stack/full-stack/Dockerfile +++ b/stack/full-stack/Dockerfile @@ -1,17 +1,17 @@ # syntax=docker/dockerfile:1 -ARG PGDATA_FOLDER FROM base-with-services as base -ARG PGDATA_FOLDER -ENV PGDATA=${PGDATA_FOLDER} FROM lab +# WARNING: If you change this, you have to change it in base-with-services as well +ENV PGDATA="/home/${NB_USER}/.postgresql" + USER root COPY --from=base /opt/config-quick-setup.yaml /opt/ COPY --from=base "${CONDA_DIR}/envs/aiida-core-services" "${CONDA_DIR}/envs/aiida-core-services" COPY --from=base /usr/local/bin/before-notebook.d /usr/local/bin/before-notebook.d -COPY --from=base ${PGDATA_FOLDER} ${PGDATA_FOLDER} +COPY --from=base ${PGDATA} ${PGDATA} RUN fix-permissions "${CONDA_DIR}" RUN fix-permissions "/home/${NB_USER}/.aiida"