From f2b21327aa3b6a405e86d1edcbf455c0ed77fe70 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 8 Mar 2022 07:57:22 +0100 Subject: [PATCH] Allow model overrides in child images --- sahana-default/Dockerfile | 3 +++ sahana-sambro/Dockerfile | 4 +--- sahana/Dockerfile | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 sahana-default/Dockerfile diff --git a/sahana-default/Dockerfile b/sahana-default/Dockerfile new file mode 100644 index 0000000..36fb271 --- /dev/null +++ b/sahana-default/Dockerfile @@ -0,0 +1,3 @@ +FROM sahana:latest + +VOLUME ["/srv/web2py/applications/eden/models"] diff --git a/sahana-sambro/Dockerfile b/sahana-sambro/Dockerfile index 38573ef..68741b1 100644 --- a/sahana-sambro/Dockerfile +++ b/sahana-sambro/Dockerfile @@ -6,6 +6,4 @@ RUN \ # Change ownership of the newly copied files find /srv/web2py ! -user sahana -exec chown -R sahana:sahana {} + -ENTRYPOINT ["/entrypoint.sh"] -EXPOSE 8080 -VOLUME ["/srv/web2py/applications/eden/models", "/srv/web2py/applications/eden/databases", "/srv/web2py/applications/eden/errors", "/srv/web2py/applications/eden/sessions", "/srv/web2py/applications/eden/uploads"] +VOLUME ["/srv/web2py/applications/eden/models"] diff --git a/sahana/Dockerfile b/sahana/Dockerfile index 101e483..820ed4a 100644 --- a/sahana/Dockerfile +++ b/sahana/Dockerfile @@ -54,4 +54,6 @@ RUN \ ENTRYPOINT ["/entrypoint.sh"] EXPOSE 8080 -VOLUME ["/srv/web2py/applications/eden/models", "/srv/web2py/applications/eden/databases", "/srv/web2py/applications/eden/errors", "/srv/web2py/applications/eden/sessions", "/srv/web2py/applications/eden/uploads"] +# VOLUME /srv/web2py/applications/eden/models not declared here to allow volume data overrides +# Specifying it here would cause any subsequent changes under the volume path (such as changes to 000_config.py) to be discarded +VOLUME ["/srv/web2py/applications/eden/databases", "/srv/web2py/applications/eden/errors", "/srv/web2py/applications/eden/sessions", "/srv/web2py/applications/eden/uploads"]