-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (67 loc) · 2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (67 loc) · 2 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
services:
db:
image: postgres:17-alpine
container_name: codeowl-clean-db
environment:
POSTGRES_DB: codeowl
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- db_data:/var/lib/postgresql/data
- ./db/init:/docker-entrypoint-initdb.d:ro
ports:
- "5432:5432" # optional, nur falls du von Host drauf willst
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d codeowl"]
interval: 5s
timeout: 3s
retries: 20
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: codeowl-clean-backend
depends_on:
db:
condition: service_healthy
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/codeowl
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
OPENAI_API_KEY: ${OPENAI_API_KEY}
SPRING_PROFILES_ACTIVE: dev
JWT_SECRET: ${JWT_SECRET:-defaultDevSecretKeyThatIsAtLeast256BitsLongForHS256Algorithm!!}
APP_BASE_URL: ${APP_BASE_URL:-http://localhost:5175}
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-*}
MAIL_HOST: ${MAIL_HOST:-}
MAIL_PORT: ${MAIL_PORT:-587}
MAIL_USERNAME: ${MAIL_USERNAME:-}
MAIL_PASSWORD: ${MAIL_PASSWORD:-}
ports:
- "8080:8080"
# Maven wird jetzt im Build ausgeführt → kein Volume mehr nötig
# volumes:
# - ./backend:/app
# - ~/.m2:/root/.m2
# command: ./mvnw spring-boot:run # <- wird nicht mehr gebraucht!
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- VITE_API_BASE_URL=${VITE_API_BASE_URL:-/codeowl/api}
- VITE_BASE_PATH=${VITE_BASE_PATH:-/codeowl/}
container_name: codeowl-clean-frontend
depends_on:
- backend
ports:
- "5175:80"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost/health"]
interval: 10s
timeout: 3s
retries: 3
volumes:
db_data: