Skip to content

Commit c163625

Browse files
committed
Add Docker Compose configuration for PostgreSQL and application services
1 parent 7059baf commit c163625

2 files changed

Lines changed: 66 additions & 2 deletions

File tree

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
DB_URL=jdbc:postgresql://postgres:5432/udav
88
DB_USER=postgres
99
DB_PASS=postgres
10+
POSTGRES_DB=udav
1011
DB_SCHEMA=public
1112
DB_DIALECT=POSTGRES
1213
# Batch size for database inserts (default: 5000)
@@ -58,5 +59,4 @@ LLM_API_TOKEN=your-api-token-here
5859
# Java Options
5960
# ============================================
6061
# Adjust memory based on your system and data size
61-
JAVA_OPTS=-Xmx2048m -Xms1024m
62-
62+
JAVA_OPTS="-Xmx10G -Xms1024m"

docker-compose.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
services:
2+
postgres:
3+
image: postgres:17-alpine
4+
container_name: udav-postgres
5+
restart: unless-stopped
6+
environment:
7+
POSTGRES_DB: ${POSTGRES_DB:-udav}
8+
POSTGRES_USER: ${DB_USER:-postgres}
9+
POSTGRES_PASSWORD: ${DB_PASS:-postgres}
10+
ports:
11+
- "5432:5432"
12+
volumes:
13+
- postgres_data:/var/lib/postgresql/data
14+
healthcheck:
15+
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${POSTGRES_DB:-udav}"]
16+
interval: 10s
17+
timeout: 5s
18+
retries: 5
19+
20+
udav:
21+
build:
22+
context: .
23+
dockerfile: Dockerfile
24+
container_name: udav-app
25+
restart: unless-stopped
26+
depends_on:
27+
postgres:
28+
condition: service_healthy
29+
ports:
30+
- "8080:8080"
31+
environment:
32+
DB_URL: jdbc:postgresql://postgres:5432/${POSTGRES_DB:-udav}
33+
DB_USER: ${DB_USER:-postgres}
34+
DB_PASS: ${DB_PASS:-postgres}
35+
DB_SCHEMA: ${DB_SCHEMA:-public}
36+
DB_DIALECT: ${DB_DIALECT:-POSTGRES}
37+
DB_BATCH_SIZE: ${DB_BATCH_SIZE:-5000}
38+
DB_MAX_IDENT: ${DB_MAX_IDENT:-255}
39+
DUUI_IMPORTER: ${DUUI_IMPORTER:-false}
40+
DUUI_IMPORTER_PATH: /app/data/input
41+
DUUI_IMPORTER_FILE_ENDING: ${DUUI_IMPORTER_FILE_ENDING:-.xmi}
42+
DUUI_IMPORTER_WORKERS: ${DUUI_IMPORTER_WORKERS:-4}
43+
DUUI_IMPORTER_CAS_POOL_SIZE: ${DUUI_IMPORTER_CAS_POOL_SIZE:-8}
44+
DUUI_IMPORTER_TYPE_SYSTEM_PATH: ${DUUI_IMPORTER_TYPE_SYSTEM_PATH:-}
45+
APP_INPUT_DIR: ${APP_INPUT_DIR:-/app/data/input}
46+
PIPELINE_IMPORTER: ${PIPELINE_IMPORTER:-true}
47+
PIPELINE_IMPORTER_FOLDER: ${PIPELINE_IMPORTER_FOLDER:-/app/pipelines}
48+
PIPELINE_IMPORTER_REPLACE_IF_DIFFERENT: ${PIPELINE_IMPORTER_REPLACE_IF_DIFFERENT:-false}
49+
SROUCE_BUILDER: ${SROUCE_BUILDER:-false}
50+
LLM_BASE_URL: ${LLM_BASE_URL:-}
51+
LLM_API_TOKEN: ${LLM_API_TOKEN:-}
52+
JAVA_OPTS: ${JAVA_OPTS:--Xmx20G -Xms512m}
53+
healthcheck:
54+
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health/liveness || exit 1"]
55+
interval: 30s
56+
timeout: 10s
57+
retries: 3
58+
start_period: 40s
59+
volumes:
60+
- ${DUUI_IMPORTER_PATH}:/app/data/input:ro
61+
62+
volumes:
63+
postgres_data:
64+

0 commit comments

Comments
 (0)