-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (50 loc) · 989 Bytes
/
docker-compose.yml
File metadata and controls
55 lines (50 loc) · 989 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
51
52
53
54
55
version: '3.8'
services:
db:
image: postgres:16.1-alpine
ports:
- '5432:5432'
environment:
- POSTGRES_DB=eau-de-go
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
networks:
- eau-de-go
volumes:
- database_postgres:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
migrate:
build:
context: .
dockerfile: Dockerfile.migrate
depends_on:
db:
condition: service_healthy
env_file:
- .env.docker
networks:
- eau-de-go
server:
build:
context: .
dockerfile: Dockerfile.server
env_file:
- .env.docker
ports:
- '8080:8080'
depends_on:
db:
condition: service_healthy
migrate:
condition: service_started
networks:
- eau-de-go
volumes:
database_postgres:
networks:
eau-de-go:
driver: bridge