aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile-debian-python2-sqlite4
-rw-r--r--Dockerfile-debian-python3-sqlite16
-rw-r--r--docker-compose.yml3
-rw-r--r--setup.py3
4 files changed, 14 insertions, 12 deletions
diff --git a/Dockerfile-debian-python2-sqlite b/Dockerfile-debian-python2-sqlite
index 82e91bc8..5cabef0f 100644
--- a/Dockerfile-debian-python2-sqlite
+++ b/Dockerfile-debian-python2-sqlite
@@ -48,16 +48,14 @@ RUN mkdir /opt/mediagoblin
RUN chown -R www-data:www-data /opt/mediagoblin
WORKDIR /opt/mediagoblin
-RUN mkdir /var/www
+RUN mkdir --mode=g+w /var/www
RUN chown root:www-data /var/www
-RUN chmod g+w /var/www
RUN groupadd --system mediagoblin --gid 1024 && adduser www-data mediagoblin
USER www-data
RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git -b master .
-RUN git submodule init && git submodule update
RUN ./bootstrap.sh
RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure
diff --git a/Dockerfile-debian-python3-sqlite b/Dockerfile-debian-python3-sqlite
index 0960bf12..5ee7d3be 100644
--- a/Dockerfile-debian-python3-sqlite
+++ b/Dockerfile-debian-python3-sqlite
@@ -6,8 +6,8 @@
#
# To build this Docker image, run:
#
-# docker build -t mediagoblin-python3 -f Dockerfile-python3 # or
-# docker build -t mediagoblin-python3 - < Dockerfile-python3 # with no build context
+# docker build -t mediagoblin-python3 -f Dockerfile-debian-python3-sqlite . # or
+# docker build -t mediagoblin-python3 - < Dockerfile-debian-python3-sqlite # with no build context
#
# The "- < Dockerfile" format advises Docker not to include the current
# directory as build context.
@@ -22,12 +22,13 @@
#
# Then you can run the image with the upstream MediaGoblin code:
#
-# docker run --interactive --tty --publish 6543:6543 mediagoblin-python
+# docker run --interactive --tty --publish 6543:6543 mediagoblin-python3
#
# Or you can run with your local "mediagoblin" and "user_dev" directories
# bind-mounted into the container. This provides automatic code reloading and
# persistence:
#
+# # TODO: Not working.
# docker run --interactive --tty --publish 6543:6543 --volume ./mediagoblin:/opt/mediagoblin/mediagoblin --volume ./extlib:/opt/mediagoblin/extlib mediagoblin-python3
#
# Alternatively you use docker-compose instead of separate build/run steps:
@@ -36,6 +37,11 @@
# find mediagoblin user_dev -type d -exec chmod 775 {} \;
# find mediagoblin user_dev -type f -exec chmod 664 {} \;
# docker-compose up --build
+#
+# You can run the test suite with:
+#
+# docker run --tty mediagoblin-python3 bash -c "bin/python -m pytest ./mediagoblin/tests --boxed"
+
FROM debian:buster
@@ -94,9 +100,8 @@ WORKDIR /opt/mediagoblin
# Create /var/www because Bower writes some cache files into /var/www during
# make, failing if it doesn't exist.
-RUN mkdir /var/www
+RUN mkdir --mode=g+w /var/www
RUN chown root:www-data /var/www
-RUN chmod g+w /var/www
# Set up custom group to align with volume permissions for mounted
# "mediagoblin/mediagoblin" and "mediagoblin/user_dev".
@@ -127,7 +132,6 @@ USER www-data
# database type. So instead we're doing a git clone. We could potentially use
# `git archive` but this still wouldn't account for the submodules.
RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git -b master .
-RUN git submodule init && git submodule update
RUN ./bootstrap.sh
RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure --with-python3
diff --git a/docker-compose.yml b/docker-compose.yml
index 031ddac1..e31ac9f8 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,8 +1,7 @@
# A docker-compose recipe for MediaGoblin hacking.
#
# Tested on Trisquel 8 and Guix System. Currently runs Python 3 and works for
-# photos and video. Audio raises an exception "NameError: name 'audiolab' is not
-# defined".
+# images, audio and video.
#
# To run the system:
#
diff --git a/setup.py b/setup.py
index 157b9113..e8b2786a 100644
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,8 @@ install_requires = [
'pytest>=2.3.1',
'pytest-xdist',
'werkzeug>=0.7,<1.0.0',
- 'celery>=3.0',
+ # Celery 4.3.0 drops the "sqlite" transport alias making our tests fail.
+ 'celery>=3.0,<4.3.0',
# Jinja2 3.0.0 uses f-strings (Python 3.7 and above) but `pip install` on
# Debian 9 doesn't seem to respect Jinja2's 'python_requires=">=3.6"' line.
'jinja2<3.0.0',