-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (51 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
55 lines (51 loc) · 1.11 KB
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
51
52
53
54
55
version: '3'
services:
db:
image: "postgres:alpine"
container_name: teca_db
environment:
- POSTGRES_USER=docker
- POSTGRES_PASSWORD=docker
- POSTGRES_DB=teca_coif
ports:
- "5432:5432"
volumes:
- ./docker-compose/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME} || exit 1"]
interval: 10s
timeout: 5s
retries: 5
networks:
- teca_network
api:
build: .
container_name: teca_api
env_file:
- .env
ports:
- "5000:5000"
environment:
- QUART_ENV=development
- QUART_APP=run.py
- QUART_RUN_HOST=${API_HOST}
- QUART_RUN_PORT=${API_PORT}
- DATABASE_URL=${DATABASE_URL}
depends_on:
db:
condition: service_healthy
volumes:
- .:/app
networks:
- teca_network
volumes:
pgdata:
driver: local
driver_opts:
type: none
device: ./docker-compose/postgres/pgdata
o: bind
networks:
teca_network:
driver: bridge