-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (64 loc) · 1.42 KB
/
docker-compose.yml
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
volumes:
gopher-redis-data:
name: gopher-redis-data
gopher-postgres-data:
name: gopher-postgres-data
services:
gopher-server:
build:
context: .
dockerfile: ./compose/.server.dockerfile
image: gopher-server:latest
container_name: gopher-server
env_file:
- ./.envs/.server.env
ports:
- "8080:8080"
volumes:
- .:/app:z
networks:
- gopher-network
healthcheck:
test: [ "CMD", "/app/healthCheck.sh" ]
interval: 1m30s
retries: 5
start_period: 30s
timeout: 30s
depends_on:
gopher-redis:
condition: service_healthy
gopher-postgres:
condition: service_healthy
gopher-redis:
image: redis:latest
container_name: gopher-redis
volumes:
- gopher-redis-data:/data
networks:
- gopher-network
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 1m30s
retries: 5
timeout: 30s
start_period: 30s
gopher-postgres:
image: postgres:16-alpine
container_name: gopher-postgres
volumes:
- gopher-postgres-data:/var/lib/postgresql/data
env_file:
- ./.envs/.postgres.env
ports:
- "5432:5432"
networks:
- gopher-network
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 1m30s
retries: 5
timeout: 30s
start_period: 30s
networks:
gopher-network:
driver: bridge