summaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: 47786eca98367f995a9465191fbad5136419ab9a (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
# the version of docker-compose shipped in ubuntu 16.04 is
# 1.5.2, which doesn't support version 2 syntax. Yay!
# also, v1 doesn't support explicit build args, so if you're not
# uid 1000, you will either need to manually hack the Dockerfile
# or upgrade to v2 and use the build-arg to override it.

db:
  image: mysql:5.7
  volumes:
    - ./tools/docker/db/data:/var/lib/mysql
  environment:
    - MYSQL_ROOT_PASSWORD=password
    - MYSQL_USER=patchwork
    - MYSQL_PASSWORD=password

web:
  build: .
  dockerfile: ./tools/docker/Dockerfile
  command: python3 manage.py runserver 0.0.0.0:8000
  volumes:
    - .:/home/patchwork/patchwork/
  ports:
    - "8000:8000"
  links:
    - db
  environment:
    - PW_TEST_DB_HOST=db
    - PW_TEST_DB_PORT=3306