M Dockerfile => Dockerfile +7 -8
@@ 5,20 5,19 @@ RUN apk add python uwsgi uwsgi-python
RUN addgroup -S -g 82 www-data \
&& adduser -S -u 82 -D -h /var/www -s /sbin/nologin www-data
-# install `MoinMoin` python package
+# install moinmoin from distribution
RUN mkdir /var/moin
COPY --chown=www-data:www-data build/moin-1.9.11 /var/moin/install
RUN cd /var/moin/install && python setup.py install
# setup wiki
-RUN mkdir /var/www/moin \
- && cp /usr/share/moin/server /var/www/moin/ -r \
- && cp /usr/share/moin/underlay /var/www/moin/ -r \
- && chown www-data:www-data /var/www/moin -R
-COPY --chown=www-data:www-data moinmoin/* /var/www/moin/
+RUN cp -r /usr/share/moin/server /var/moin/webroot/
+RUN cp -r /usr/share/moin/underlay /var/moin/webroot/
+RUN chown www-data:www-data /var/moin/webroot -R
+COPY --chown=www-data:www-data moinmoin/* /var/moin/webroot/
EXPOSE 9000
-WORKDIR /var/www/moin
+WORKDIR /var/moin/webroot
ENTRYPOINT ["/usr/sbin/uwsgi"]
-CMD ["--ini", "/var/www/moin/uwsgi.ini"]
+CMD ["--ini", "/var/moin/webroot/uwsgi.ini"]
M Makefile => Makefile +5 -2
@@ 4,13 4,16 @@ UPSTREAM_SHA256="02be31d55f39d4fe0c6253df8b49e01b76d095634cbd1b56d185f66e1e0c3cf
UPSTREAM_GPG="FAF7B393"
clean:
- rm -f build/*
+ rm -rf build/*
download:
curl ${UPSTREAM_URL_MOIN} --output build/moin.tar.gz
curl ${UPSTREAM_URL_SIG} --output build/moin.tar.gz.asc
echo "${UPSTREAM_SHA256} build/moin.tar.gz" | sha256sum --check
- gpg --keyserver keys.gnupg.net --recv-key ${UPSTREAM_GPG}
+ gpg --keyserver keyserver.ubuntu.com --recv-key ${UPSTREAM_GPG}
gpg --verify build/moin.tar.gz.asc build/moin.tar.gz
tar xzf build/moin.tar.gz --directory build/
+image: clean download
+ docker build --tag my-moin .
+
M moinmoin/moin.wsgi => moinmoin/moin.wsgi +1 -1
@@ 29,7 29,7 @@ import sys, os
# a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
# See wiki/config/... for some sample config files.
-sys.path.insert(0, '/var/www/moin')
+sys.path.insert(0, '/var/moin/webroot')
#sys.path.insert(0, '/path/to/farmconfigdir')
# b) Configuration of moin's logging
M moinmoin/uwsgi.ini => moinmoin/uwsgi.ini +2 -2
@@ 4,8 4,8 @@ gid = www-data
socket = :9000
plugin = python
-chdir = /var/www/moin
-wsgi-file = /var/www/moin/moin.wsgi
+chdir = /var/moin/webroot
+wsgi-file = /var/moin/webroot/moin.wsgi
master
workers = 3