-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
47 lines (45 loc) · 887 Bytes
/
docker-compose.test.yml
File metadata and controls
47 lines (45 loc) · 887 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
version: '3'
services:
postgres:
image: postgres:latest
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- ./init_test.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test:
[
"CMD",
"pg_isready",
"-q",
"-d",
"postgres",
"-U",
"postgres"
]
interval: 5s
timeout: 3s
retries: 5
redis:
image: redis:latest
ports:
- "6379:6379"
go-app:
image: app:latest
depends_on:
postgres:
condition: service_healthy
ports:
- "8080:8080"
environment:
DB_HOST: postgres
DB_DRIVER: postgres
DB_USER: postgres
DB_PASSWORD: postgres
DB_NAME: postgres
DB_PORT: 5432
PORT: 8080
REDIS_URL: redis:6379