diff options
Diffstat (limited to 'docker-compose-pg.yml')
-rw-r--r-- | docker-compose-pg.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docker-compose-pg.yml b/docker-compose-pg.yml new file mode 100644 index 0000000..31ef843 --- /dev/null +++ b/docker-compose-pg.yml @@ -0,0 +1,30 @@ +# 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: postgres + environment: + - POSTGRES_PASSWORD=password + volumes: + - ./tools/docker/db/postdata:/var/lib/postgresql/data + +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: + - PGPASSWORD=password + - PW_TEST_DB_HOST=db + - PW_TEST_DB_PORT=5432 + - PW_TEST_DB_TYPE=postgres + - PW_TEST_DB_USER=postgres + - PW_TEST_DB_PASS=password |