Bump Sahana to Alpine 3.11

This commit is contained in:
Disassembler 2020-02-07 18:29:23 +01:00
parent bba8f06422
commit e5c6203412
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
10 changed files with 13 additions and 13 deletions

View File

@ -1,19 +1,16 @@
IMAGE sahana_0.0.1-190620 IMAGE sahana_0.0.1-200207
FROM alpine3.9-python2.7_2.7.16-190620 FROM alpine3.11-python3.8_3.8.1-200207
RUN EOF RUN EOF
# Install runtime dependencies # Install runtime dependencies
apk --no-cache add geos@vm nginx py-gdal@vm py2-dateutil py2-lxml py2-numpy py2-pillow py2-psycopg2 py2-requests uwsgi-python apk --no-cache add geos nginx py3-gdal py3-dateutil py3-lxml py3-numpy py3-pillow py3-psycopg2 py3-requests uwsgi-python3
# Install build dependencies # Install build dependencies
apk --no-cache add --virtual .deps build-base git freetype-dev libpng-dev py-numpy-dev py2-pip python2-dev ttf-dejavu apk --no-cache add --virtual .deps build-base git freetype-dev libpng-dev py3-numpy-dev py3-pip python3-dev ttf-dejavu
# Hackfix for python find_library('c') call
ln -s /lib/ld-musl-x86_64.so.1 /lib/libc.so.1
# Install web2py # Install web2py
git clone --recursive https://github.com/web2py/web2py.git /srv/web2py git clone --recursive https://github.com/web2py/web2py.git /srv/web2py
git -C /srv/web2py checkout 59700b8 git -C /srv/web2py checkout 6128d03
git -C /srv/web2py submodule update git -C /srv/web2py submodule update
# Symlink WSGI handler # Symlink WSGI handler
@ -25,22 +22,21 @@ RUN EOF
# Install python dependencies, exclude old or unnecessary ones # Install python dependencies, exclude old or unnecessary ones
sed -i 's/^ansible/#ansible/' /srv/web2py/applications/eden/optional_requirements.txt sed -i 's/^ansible/#ansible/' /srv/web2py/applications/eden/optional_requirements.txt
sed -i 's/^boto/#boto/' /srv/web2py/applications/eden/optional_requirements.txt sed -i 's/^boto/#boto/' /srv/web2py/applications/eden/optional_requirements.txt
sed -i 's/^PIL/#PIL/' /srv/web2py/applications/eden/optional_requirements.txt
sed -i 's/^PyRTF/#PyRTF/' /srv/web2py/applications/eden/optional_requirements.txt sed -i 's/^PyRTF/#PyRTF/' /srv/web2py/applications/eden/optional_requirements.txt
sed -i 's/^PyYAML/#PyYAML/' /srv/web2py/applications/eden/optional_requirements.txt sed -i 's/^PyYAML/#PyYAML/' /srv/web2py/applications/eden/optional_requirements.txt
pip install -r /srv/web2py/applications/eden/optional_requirements.txt pip3 install -r /srv/web2py/applications/eden/optional_requirements.txt
# Copy fonts with Czech glyphs # Copy fonts with Czech glyphs
cp /usr/share/fonts/ttf-dejavu/DejaVuSerif-Bold.ttf /srv/web2py/applications/eden/static/fonts/Helvetica-Bold.ttf cp /usr/share/fonts/ttf-dejavu/DejaVuSerif-Bold.ttf /srv/web2py/applications/eden/static/fonts/Helvetica-Bold.ttf
cp /usr/share/fonts/ttf-dejavu/DejaVuSerif.ttf /srv/web2py/applications/eden/static/fonts/Helvetica.ttf cp /usr/share/fonts/ttf-dejavu/DejaVuSerif.ttf /srv/web2py/applications/eden/static/fonts/Helvetica.ttf
EOF EOF
COPY lxc COPY image.d
RUN EOF RUN EOF
# Create OS user # Create OS user
addgroup -S -g 8080 sahana addgroup sahana
adduser -S -u 8080 -h /srv/web2py -s /bin/false -g sahana -G sahana sahana adduser -h /srv/web2py -s /bin/false -g sahana -G sahana sahana
chown -R sahana:sahana /srv/web2py chown -R sahana:sahana /srv/web2py
# Cleanup # Cleanup
@ -49,3 +45,5 @@ RUN EOF
rm -r /srv/web2py/applications/admin /srv/web2py/applications/examples /srv/web2py/applications/welcome rm -r /srv/web2py/applications/admin /srv/web2py/applications/examples /srv/web2py/applications/welcome
rm -r /root/.cache rm -r /root/.cache
EOF EOF
CMD s6-svscan /etc/services.d

View File

@ -15,6 +15,8 @@ http {
server_tokens off; server_tokens off;
client_max_body_size 100m; client_max_body_size 100m;
sendfile on; sendfile on;
tcp_nodelay on;
send_timeout 300;
server { server {
listen 8080; listen 8080;