Bump Sahana to Alpine 3.11
This commit is contained in:
parent
bba8f06422
commit
e5c6203412
@ -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
|
@ -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;
|
0
lxc-apps/sahana/lxc/etc/services.d/.s6-svscan/finish → lxc-apps/sahana/image.d/etc/services.d/.s6-svscan/finish
Executable file → Normal file
0
lxc-apps/sahana/lxc/etc/services.d/.s6-svscan/finish → lxc-apps/sahana/image.d/etc/services.d/.s6-svscan/finish
Executable file → Normal file
0
lxc-apps/sahana/lxc/etc/services.d/nginx/run → lxc-apps/sahana/image.d/etc/services.d/nginx/run
Executable file → Normal file
0
lxc-apps/sahana/lxc/etc/services.d/nginx/run → lxc-apps/sahana/image.d/etc/services.d/nginx/run
Executable file → Normal file
0
lxc-apps/sahana/lxc/etc/services.d/uwsgi/run → lxc-apps/sahana/image.d/etc/services.d/uwsgi/run
Executable file → Normal file
0
lxc-apps/sahana/lxc/etc/services.d/uwsgi/run → lxc-apps/sahana/image.d/etc/services.d/uwsgi/run
Executable file → Normal file
Loading…
Reference in New Issue
Block a user