-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
101 lines (94 loc) · 2.74 KB
/
Copy pathdocker-compose-dev.yml
File metadata and controls
101 lines (94 loc) · 2.74 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
services:
# PostgreSQL Database with PostGIS
travstats-db-dev:
image: postgis/postgis:15-3.4
container_name: travstats-db-dev
restart: unless-stopped
env_file:
- .env.dev.local
ports:
- "5433:5432" # Non-standard port: 5433 instead of 5432
volumes:
- travstats-db-dev-data:/var/lib/postgresql/data
networks:
- travstats-dev-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
# Ollama LLM Server (for AI-powered email parsing)
ollama-dev:
image: ollama/ollama:latest
container_name: travstats-ollama-dev
restart: unless-stopped
env_file:
- .env.dev.local
entrypoint: ["/bin/sh", "-c"]
command:
- MODEL=$${OLLAMA_MODEL:-gemma3:12b}; ollama serve & sleep 5 && ollama pull "$${MODEL}" && wait
environment:
OLLAMA_KEEP_ALIVE: 4h
ports:
- "11434:11434"
volumes:
- travstats-ollama-dev-data:/root/.ollama
networks:
- travstats-dev-network
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# TravStats Application
travstats-app-dev:
# Using GitHub Container Registry
image: ghcr.io/abrechen2/travstats:latest
working_dir: /app/backend # make npm scripts default to backend path
# Alternative: Use Docker Hub (if you push there)
# image: abrechen2/travstats:latest
# Option 3: Build locally (uncomment to build from source)
# build:
# context: .
# dockerfile: Dockerfile
container_name: travstats-app-dev
restart: unless-stopped
depends_on:
travstats-db-dev:
condition: service_healthy
ollama-dev:
condition: service_started
env_file:
- .env.dev.local
environment:
# Training Settings (can be overridden in .env.dev.local)
PYTHON_CMD: ${PYTHON_CMD:-python3}
DOCKER: ${DOCKER:-true}
# Backup Settings
BACKUP_PATH: /app/data/backups
BACKUP_RETENTION_DAYS: ${BACKUP_RETENTION_DAYS:-30}
DOCKER_DB_CONTAINER: ${DOCKER_DB_CONTAINER:-travstats-db-dev}
ports:
- "3004:80" # Map to nginx internal port 80 (not 3000!)
volumes:
- travstats-app-dev-data:/app/data
networks:
- travstats-dev-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
travstats-dev-network:
driver: bridge
name: travstats-dev-network
volumes:
travstats-db-dev-data:
driver: local
travstats-app-dev-data:
driver: local
travstats-ollama-dev-data:
driver: local