/docker-compose.yml
https://github.com/mozilla/foundation.mozilla.org · YAML · 53 lines · 45 code · 5 blank · 3 comment · 0 complexity · 00041cb1ee94d18110539caaf65bc40a MD5 · raw file
- version: '3'
- services:
- watch-static-files:
- build:
- context: .
- dockerfile: ./dockerfiles/Dockerfile.node
- env_file:
- - .env
- environment:
- # Need to specify the SHELL env var for chokidar
- - SHELL=/bin/sh
- # Force polling because inotify doesn't work on Docker Windows
- - CHOKIDAR_USEPOLLING=1
- command: npm run watch
- volumes:
- - .:/app:delegated
- - node_modules:/app/node_modules/:delegated
- postgres:
- image: postgres:10.12
- ports:
- - "5678:5432"
- environment:
- - POSTGRES_DB=wagtail
- - POSTGRES_USER=foundation
- # We're only using this setting for local dev!
- - POSTGRES_HOST_AUTH_METHOD=trust
- volumes:
- - postgres_data:/var/lib/postgresql/data/:delegated
- backend:
- build:
- context: .
- dockerfile: ./dockerfiles/Dockerfile.python
- env_file:
- - ".env"
- command: dockerpythonvenv/bin/python network-api/manage.py runserver 0.0.0.0:8000
- ports:
- - "8000:8000"
- - "8001:8001" # ptvsd port for debugging
- volumes:
- - .:/app:delegated
- - dockerpythonvenv:/app/dockerpythonvenv/:delegated
- depends_on:
- - postgres
- - watch-static-files
- volumes:
- postgres_data:
- node_modules:
- dockerpythonvenv: