Add a dependency link between two containers and change the way Django migrations are done. Provide example for auto-starting the containers

This commit is contained in:
Georgi Todorov
2018-02-05 18:23:35 -05:00
parent 36366ab5a1
commit 0f6ff6ad53
4 changed files with 29 additions and 5 deletions

View File

@@ -1,12 +1,19 @@
version: '2'
version: '2.1'
services:
webserver:
build: ./
# uncomment the following line to start automatically on system boot
# restart: always
ports:
# You can adapt the port you want Paperless to listen on by
# modifying the part before the `:`.
- "8000:8000"
healthcheck:
test: ["CMD", "curl" , "-f", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- data:/usr/src/paperless/data
- media:/usr/src/paperless/media
@@ -21,6 +28,11 @@ services:
consumer:
build: ./
# uncomment the following line to start automatically on system boot
# restart: always
depends_on:
webserver:
condition: service_healthy
volumes:
- data:/usr/src/paperless/data
- media:/usr/src/paperless/media