-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.data-hub-api.yml
50 lines (46 loc) · 1.72 KB
/
docker-compose.data-hub-api.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
39
40
41
42
43
44
45
46
47
48
49
50
services:
api-dnb:
build:
context: .
ports:
- "9000:8000"
volumes:
- .:/app
entrypoint: dockerize -wait tcp://postgres-dnb:5432 -wait tcp://redis-dnb:6379 -timeout 120s
env_file: .env
# We inject some custom environment variables here to retain compatibility with existing .env
environment:
- 'DATABASE_CREDENTIALS={"username": "postgres", "password": "dnbservice", "engine": "postgres", "port": 5432, "dbname": "dnb-service", "host": "postgres", "dbInstanceIdentifier": "postgres-dnb"}'
- REDIS_URL=redis://redis-dnb:6379
depends_on:
- postgres-dnb
- redis-dnb
command: /app/start_docker.sh
celery-dnb:
build:
context: .
volumes:
- .:/app
entrypoint: dockerize -wait tcp://postgres-dnb:5432 -wait tcp://redis-dnb:6379 -timeout 180s
env_file: .env
# We inject some custom environment variables here to retain compatibility with existing .env
environment:
- DATABASE_URL=postgres://postgres:dnbservice@postgres-dnb/dnb-service
- REDIS_URL=redis://redis-dnb:6379
command: watchmedo auto-restart -d . -R -p '*.py' -- celery -A worker config -l info -Q celery -B
postgres-dnb:
image: postgres:10
restart: always
environment:
- POSTGRES_DB=dnb-service
- POSTGRES_PASSWORD=dnbservice
redis-dnb:
image: redis:7.2.4
restart: always
# Note: The `data-infrastructure-shared-network` network is created by running `make start-*` within `data-hub-frontend`.
# `make start-dev` or other start command must be run prior to `docker-compose -f ./docker-compose.data-hub-api.yml up`
# otherwise the network won't exist
networks:
default:
external:
name: data-infrastructure-shared-network