-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
50 lines (40 loc) · 858 Bytes
/
Copy pathdocker-compose.dev.yml
File metadata and controls
50 lines (40 loc) · 858 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
38
39
40
41
42
43
44
45
46
47
48
49
50
services:
app:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "${PORT}:8080"
env_file:
- .env
volumes:
- .:/app
- gomodcache:/go/pkg/mod
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
interval: 2s
timeout: 5s
retries: 10
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
redis:
image: redis:7.2-alpine
ports:
- "6379:6379"
volumes:
pgdata:
gomodcache: