docs: Add chapter on upgrading, inc. system Python upgrades [#972].
[mediagoblin.git] / Dockerfile-debian-python3-sqlite
index 064d29e67d26a9a13b2eebc93fe5890dd7b6aa98..ea585c6a9fec1f443209ab3eb138db82f04e28ad 100644 (file)
@@ -6,7 +6,7 @@
 #
 # To build this Docker image, run:
 #
-#   docker build -t mediagoblin-python3 -f Dockerfile-debian-python3-sqlite  # or
+#   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
 #
 # 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:
 #   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
 
@@ -75,10 +81,7 @@ gstreamer1.0-plugins-bad \
 gstreamer1.0-plugins-base \
 gstreamer1.0-plugins-good \
 gstreamer1.0-plugins-ugly \
-libsndfile1-dev \
-python3-gst-1.0 \
-python3-numpy \
-python3-scipy
+python3-gst-1.0
 
 # Install video dependencies.
 RUN apt-get install -y \
@@ -87,6 +90,11 @@ gir1.2-gstreamer-1.0 \
 gstreamer1.0-tools \
 python3-gi
 
+# Install document (PDF-only) dependencies.
+# TODO: Check that PDF tests aren't skipped.
+RUN apt-get install -y \
+poppler-utils
+
 # Create working directory.
 RUN mkdir /opt/mediagoblin
 RUN chown -R www-data:www-data /opt/mediagoblin
@@ -125,14 +133,20 @@ USER www-data
 # changed from the default - say you've enabled some plugins or switched
 # 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 .
+#
+# TODO: Figure out a docker-only way to do the build and run from our local
+# version, so that local changes are immediately available to the running
+# container. Not as easy as it sounds. We have this working with docker-compose,
+# but still uses upstream MediaGoblin for the build.
+# RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git --branch master .
+RUN git clone --depth=1 https://gitlab.com/BenSturmfels/mediagoblin.git --branch spectrograms .
 
 RUN ./bootstrap.sh
-RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure --with-python3
+RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure
 RUN make
 
-# Only supported on Python 2.
-# RUN ./bin/pip install scikits.audiolab
+# Run the tests.
+RUN ./bin/python -m pytest ./mediagoblin/tests --boxed
 
 # Only safe if being run on a clean git checkout. Otherwise you may have already
 # customised mediagoblin.ini to already install these.