-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
112 lines (107 loc) · 2.7 KB
/
docker-compose.dev.yml
File metadata and controls
112 lines (107 loc) · 2.7 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
104
105
106
107
108
109
110
111
112
services:
db:
image: postgis/postgis:15-3.3
environment:
- POSTGRES_DB=cigrp
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/db/init:/docker-entrypoint-initdb.d
networks:
- app-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
martin:
build:
context: ./docker
dockerfile: martin.Dockerfile
ports:
- "3002:3000"
command: ["--config", "/config/martin.yaml"]
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/cigrp
volumes:
- ./docker/martin.yaml:/config/martin.yaml:ro
networks:
- app-network
depends_on:
db:
condition: service_healthy
backend:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:3000/health"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: base
ports:
- "3001:3000"
environment:
- RAILS_ENV=development
- MARTIN_URL=http://martin:3000
env_file:
- ./backend/.env
volumes:
- ./backend:/app
- backend_bundle_cache:/usr/local/bundle
# Uncomment to mount geoBoundaries data for import:
# - /path/to/geoboundaries:/data/geoboundaries:ro
networks:
- app-network
depends_on:
db:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:3000/health || exit 1"]
interval: 15s
timeout: 5s
retries: 5
start_period: 90s
command: /app/bin/docker-dev-entrypoint
frontend:
image: node:24.0.0-bullseye
working_dir: /app
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- CYPRESS_INSTALL_BINARY=0
- CYPRESS_RUN_BINARY=/dev/null
- WATCHPACK_POLLING=true
- CHOKIDAR_USEPOLLING=true
# Internal API host for server-side rendering (Docker network)
- INTERNAL_API_HOST=http://backend:3000
- NEXT_PUBLIC_MARTIN_URL=http://localhost:3002
env_file:
- ./frontend/.env
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
networks:
- app-network
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
command: /app/bin/docker-dev-entrypoint.sh
networks:
app-network:
driver: bridge
volumes:
postgres_data:
backend_bundle_cache:
frontend_node_modules: