aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
blob: c60d7ea6d2fcef5cbcb0a1e9bdbfcbba00a15c29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# A docker-compose recipe for MediaGoblin hacking.
#
# IMPORTANT: This docker-compose recipe is not an officially supported approach
# to deploying MediaGoblin. It is experimental and intended for helping
# developers run the test suite. To deploy MediaGoblin, see:
#
# https://mediagoblin.readthedocs.io/en/master/siteadmin/deploying.html
#
# Tested on Trisquel 8 and Guix System. Currently runs Python 3 and works for
# images, audio and video.
#
# To run the system:
#
#   docker-compose up  # or
#   docker-compose up --build  # to build the images
#
# To get a shell or Python interpreter inside a temporary container:
#
#   docker-compose run --rm web /bin/bash
#   docker-compose run --rm web /opt/mediagoblin/bin/python

version: '3'

services:
  web:
    build:
      # We need to spell this out due to having multiple Dockerfiles.
      #
      # TODO: It's possible to `docker build -` to not provide any build context
      # at all. Is this possible in docker-compose?
      context: .
      dockerfile: Dockerfile-debian-10-sqlite
    volumes:
      # Permissions need to be aligned between host and container for this to work. See
      # Dockerfile for details.
      - ./mediagoblin:/opt/mediagoblin/mediagoblin
      - ./user_dev:/opt/mediagoblin/user_dev
    ports:
      - "6543:6543"