-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (35 loc) · 923 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (35 loc) · 923 Bytes
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
services:
db:
image: pgvector/pgvector:pg16
container_name: bookmemory-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: bookmemory
ports:
- "5433:5432"
volumes:
- bookmemory_postgres:/var/lib/postgresql/data
- ./docker/db-init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d bookmemory"]
interval: 5s
timeout: 5s
retries: 20
api:
build:
context: ./apps/api
dockerfile: Dockerfile
container_name: bookmemory-api
env_file:
- .env
environment:
# reach postgres by service name for docker networking
DATABASE_URL: ${DATABASE_URL:-postgresql+asyncpg://postgres:postgres@db:5432/bookmemory}
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
bookmemory_postgres: