-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
59 lines (55 loc) · 1.25 KB
/
docker-compose.yaml
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
56
57
58
59
version: '3'
services:
llm:
image: llm:latest
hostname: llm
build:
context: ./llm/
dockerfile: llm.Dockerfile
ports:
- "3030:8080"
volumes:
- ./llm:/app:ro
command: sh -c "find . -name '*.py' | entr -nrc uvicorn main:app --host 0.0.0.0 --port 8080"
restart: always
api:
image: api:latest
hostname: api
build:
dockerfile: api.Dockerfile
target: builder
ports:
- "8080:8080"
env_file:
- .env
volumes:
- ./:/app:ro
depends_on:
database:
condition: service_healthy
command: ["make","dev-api"]
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "localhost:8080/health"]
interval: 4s
timeout: 5s
retries: 5
database:
image: postgres:alpine
build:
dockerfile: postgres.Dockerfile
hostname: postgres
environment:
POSTGRES_DB: mydb
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
ports:
- "5432:5432"
tmpfs:
- /var/lib/postgresql/data # Disable persistence
restart: always
healthcheck:
test: ["CMD", "pg_isready", "-U", "myuser", "-d", "mydb", "-h", "localhost", "-p", "5432"]
interval: 4s
timeout: 5s
retries: 5