-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
103 lines (97 loc) · 2.4 KB
/
docker-compose.dev.yml
File metadata and controls
103 lines (97 loc) · 2.4 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
102
103
# Development environment - starts all local development services
# Usage: docker compose -f docker-compose.dev.yml up -d
services:
# PostgreSQL Database for development
postgres:
image: postgres:16-alpine
container_name: wikikeeper-postgres-dev
environment:
POSTGRES_DB: wikikeeper
POSTGRES_USER: wikikeeper
POSTGRES_PASSWORD: wikikeeper123
POSTGRES_INITDB_ARGS: "-E UTF8"
ports:
- "5432:5432"
volumes:
- postgres_dev_data:/var/lib/postgresql/data
- ./docker/postgres.conf:/etc/postgresql/postgresql.conf
shm_size: 2g
healthcheck:
test: ["CMD-SHELL", "pg_isready -U wikikeeper"]
interval: 5s
timeout: 5s
retries: 10
networks:
- wikikeeper-dev
# Backend API (Go) - runs locally mounted code with hot reload
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: wikikeeper-backend-dev
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_USER: wikikeeper
DB_PASSWORD: wikikeeper123
DB_NAME: wikikeeper
PORT: 8000
HOST: 0.0.0.0
LOG_LEVEL: DEBUG
HTTP_TIMEOUT: 30.0
ADMIN_TOKEN: test
ports:
- "8000:8000"
volumes:
- ./backend:/app
- backend_deps:/go/pkg/mod
depends_on:
postgres:
condition: service_healthy
networks:
- wikikeeper-dev
stdin_open: true
tty: true
# Frontend (SvelteKit/Vite) - runs locally mounted code with hot reload
frontend:
image: node:20-alpine
container_name: wikikeeper-frontend-dev
working_dir: /app
environment:
- VITE_API_URL=http://localhost:8000
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- frontend_deps:/app/node_modules
command: sh -c "npm install && npm run dev -- --host"
networks:
- wikikeeper-dev
stdin_open: true
tty: true
# Optional: Adminer for database management
adminer:
image: adminer:latest
container_name: wikikeeper-adminer-dev
environment:
ADMINER_DEFAULT_SERVER: postgres
ADMINER_DESIGN: nette
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
networks:
- wikikeeper-dev
profiles:
- tools
volumes:
postgres_dev_data:
driver: local
backend_deps:
driver: local
frontend_deps:
driver: local
networks:
wikikeeper-dev:
driver: bridge