-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
37 lines (36 loc) · 956 Bytes
/
docker-compose.dev.yml
File metadata and controls
37 lines (36 loc) · 956 Bytes
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
services:
maglev:
build:
context: .
dockerfile: Dockerfile.dev
image: opentransitsoftwarefoundation/maglev:dev
container_name: maglev-dev
ports:
- "4000:4000"
# Delve debugger port
- "2345:2345"
volumes:
# Mount source code for live reload
- .:/app
# Use named volume for Go modules cache
- go-mod-cache:/go/pkg/mod
# Persist SQLite database
- maglev-dev-data:/app/data
environment:
- TZ=UTC
- CGO_ENABLED=1
working_dir: /app
# Use Air for live reload during development (Docker-specific config)
command: [ "air", "-c", ".air.docker.toml" ]
healthcheck:
test: [ "CMD-SHELL", "wget --spider \"http://localhost:4000/healthz\" 2>&1 || exit 1" ]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
restart: unless-stopped
volumes:
maglev-dev-data:
driver: local
go-mod-cache:
driver: local