-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (54 loc) · 1.32 KB
/
docker-compose.yml
File metadata and controls
56 lines (54 loc) · 1.32 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
56
services:
postgres:
image: pgvector/pgvector:0.8.0-pg17
container_name: defeed-engine-db-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
volumes:
- db_data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/pgvector-init.sql
- ./logs:/var/log/postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 5s
timeout: 3s
retries: 5
start_period: 5s
ports:
- "${DB_PORT}:${DB_PORT}"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
app:
container_name: defeed-engine
build:
context: .
dockerfile: Dockerfile
volumes:
- "./.env:/app/.env:ro"
- ./logs:/var/log/app
depends_on:
postgres:
condition: service_healthy
environment:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
SERVER_HOST: "0.0.0.0"
SERVER_PORT: ${SERVER_PORT}
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
volumes:
db_data: