forked from unioslo/mreg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
38 lines (36 loc) · 1.13 KB
/
docker-compose.yml
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
# THIS DOCKER COMPOSE FILE IS ONLY PROVIDED AS AN EXAMPLE, IT IS NOT SUITABLE FOR PRODUCTION AS IS.
services:
postgres:
# If you want the data in the database to remain after the container is stopped,
# you should mount a directory into /var/lib/postgresql/data, or use a volume. See the documentation:
# https://github.com/docker-library/docs/blob/master/postgres/README.md#where-to-store-data
image: postgres
environment:
- POSTGRES_USER=mreg
- POSTGRES_DB=mreg
- POSTGRES_PASSWORD=mreg
healthcheck:
test: ["CMD", "pg_isready", "--username=mreg"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
# Uncomment this if you want a RabbitMQ server to send events to. See also MQ config in settings.py
# rabbitmq:
# image: rabbitmq
# ports:
# - 5672:5672
mreg:
depends_on:
postgres:
condition: service_healthy
#rabbitmq:
# condition: service_started
build: .
ports:
- 8000:8000
environment:
- MREG_DB_HOST=postgres
- MREG_DB_NAME=mreg
- MREG_DB_USER=mreg
- MREG_DB_PASSWORD=mreg