-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (48 loc) · 1.21 KB
/
docker-compose.yml
File metadata and controls
50 lines (48 loc) · 1.21 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
services:
# PostgreSQL database
postgres:
image: postgres:15
container_name: oatdb_postgres
environment:
POSTGRES_DB: oatdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d oatdb"]
interval: 5s
timeout: 5s
retries: 5
# OAT DB Rust service
oat-db-rust:
build:
context: .
dockerfile: Dockerfile
container_name: oatdb_service
environment:
# Database configuration
OAT_DATABASE_TYPE: postgres
DATABASE_URL: postgres://postgres:password@postgres:5432/oatdb
# Server configuration
OAT_SERVER_HOST: 0.0.0.0
OAT_SERVER_PORT: 7061
# Rust specific
RUST_LOG: info
# Disable seed data loading
LOAD_SEED_DATA: "false"
ports:
- "7061:7061"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
volumes:
# Mount logs directory if needed
- ./logs:/app/logs
volumes:
postgres_data: