Prepare for persistent volumes

This commit is contained in:
Disassembler 2022-03-08 12:01:01 +01:00
parent 41218a4216
commit b01126104d
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
6 changed files with 15 additions and 20 deletions

View File

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

View File

@ -5,5 +5,3 @@ COPY image.d /
RUN \
# Change ownership of the newly copied files
find /srv/web2py ! -user sahana -exec chown -R sahana:sahana {} +
VOLUME ["/srv/web2py/applications/eden/models"]

View File

@ -5,5 +5,3 @@ COPY image.d /
RUN \
# Change ownership of the newly copied files
find /srv/web2py ! -user sahana -exec chown -R sahana:sahana {} +
VOLUME ["/srv/web2py/applications/eden/models"]

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{=T.accepted_language or "en"}}">{{# class="no-js" needed for modernizr }}
<html xmlns="http://www.w3.org/1999/xhtml" class="no-js" lang="{{=T.accepted_language or "en"}}">
<head>{{theme_styles=response.s3.theme_styles}}
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
{{# Always force latest IE rendering engine (even in intranet) & Chrome Frame }}
@ -52,17 +52,14 @@
{{else:}}
<body>
<header>
<div class="fixed">
{{=current.menu.main}}
</div>
{{=current.menu.main}}
</header>
<main role="main" class="main">
<main role='main' class='main'>
<div class='row'>
{{if current.menu.options is not None:}}
<a id='menu-options-toggle' class='tiny secondary button show-for-small' data-status='off' data-off='{{=T("Show Options")}}' data-on='{{=T("Hide Options")}}'>{{=T("Show Options")}}</a>
<div class='medium-3 large-2 columns hide-for-small' id='menu-options'>
<aside class='medium-3 large-2 columns hide-for-small' id='menu-options'>
{{=current.menu.options}}
</div>
</aside>
<div class='medium-9 large-10 columns' id='content'>
{{else:}}
<div class='medium-12 columns' id='content'>
@ -81,13 +78,13 @@
</div>
</div>
</main>
<footer role="complementary" class="footer">
<footer role='complementary' class='footer'>
<div class='row' id='footer'>
<div class='medium-12 columns'>
{{include "../modules/templates/%s/views/footer.html" % response.s3.theme_layouts}}
{{if s3.debug:}}
<div class="row">
<div class='medium-12 columns'>{{=s3.toolbar()}}</div>
<div class='row'>
<div class='medium-12 columns'>{{=s3base.s3_dev_toolbar()}}</div>
</div>
{{pass}}
</div>

View File

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

View File

@ -7,6 +7,13 @@ fi
echo "Starting Sahana Eden..."
# Fix volume permissions
chown -R sahana:sahana \
/srv/web2py/applications/eden/databases \
/srv/web2py/applications/eden/errors \
/srv/web2py/applications/eden/sessions \
/srv/web2py/applications/eden/uploads
# Create admin user CSV template
cat <<EOF >/srv/web2py/applications/eden/modules/templates/default/users/masterUsers.csv
First Name,Last Name,Email,Password,Role,Organisation