forked from ciarareeve/webSTR-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
55 lines (49 loc) · 1.18 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: '3.4'
services:
db:
image: postgres:13
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- PGUSER=webstr
- POSTGRES_USER=webstr
- POSTGRES_PASSWORD=webstr
- POSTGRES_DB=webstr
volumes:
- './db/docker_data:/var/lib/postgresql/data'
ports:
- 5432:5432
healthcheck:
test: ["CMD", "pg_isready", "-q"]
interval: 10s
timeout: 5s
retries: 5
api:
env_file:
- .env
image: webstr_api
build:
context: .
dockerfile: ./Dockerfile
ports:
- 5000:5000
depends_on:
db:
condition: service_healthy
volumes:
- '.:${WEBSTR_SOURCE_MOUNT_PATH:-/tmp/src}' # not mount of the sourcecode if not set in .env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
frontend:
environment:
- WEBSTR_API_URL=http://api:5000
- FLASK_PORT=5001
build: https://github.com/gymrek-lab/webstr.git#main
depends_on:
api:
condition: service_healthy
ports:
- 5001:5001