-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
44 lines (41 loc) · 1 KB
/
docker-compose.dev.yml
File metadata and controls
44 lines (41 loc) · 1 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
version: "3.9"
services:
db:
image: postgres:15
container_name: tpespecial_db
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=Admin20250915
- POSTGRES_DB=tpespecialweb
ports:
- "5434:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d tpespecialweb"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- pgdata_dev:/var/lib/postgresql/data
- ./db/schema:/docker-entrypoint-initdb.d/
app:
image: cosmtrek/air
container_name: tpespecial_app
working_dir: /app
depends_on:
db:
condition: service_healthy
ports:
- "8080:8080"
healthcheck:
test: ["CMD-SHELL", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 2s
retries: 15
environment:
- DB_URL=postgres://admin:Admin20250915@db:5432/tpespecialweb?sslmode=disable
volumes:
- .:/app
command: ["air", "-c", ".air.toml"]
restart: unless-stopped
volumes:
pgdata_dev: