Allow model overrides in child images

This commit is contained in:
Disassembler 2022-03-08 07:57:22 +01:00
parent da3200c8c7
commit f2b21327aa
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
3 changed files with 7 additions and 4 deletions

View File

@ -0,0 +1,3 @@
FROM sahana:latest
VOLUME ["/srv/web2py/applications/eden/models"]

View File

@ -6,6 +6,4 @@ RUN \
# Change ownership of the newly copied files # Change ownership of the newly copied files
find /srv/web2py ! -user sahana -exec chown -R sahana:sahana {} + find /srv/web2py ! -user sahana -exec chown -R sahana:sahana {} +
ENTRYPOINT ["/entrypoint.sh"] VOLUME ["/srv/web2py/applications/eden/models"]
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"]

View File

@ -54,4 +54,6 @@ RUN \
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8080 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"]