-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (47 loc) · 986 Bytes
/
docker-compose.yml
File metadata and controls
52 lines (47 loc) · 986 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
version: '3.9'
services:
db:
container_name: lib-db
image: postgres:latest
restart: always
env_file:
- .env
volumes:
- mylibdb:/var/lib/postgres
networks:
- restapi
user: postgres
healthcheck: #bununla diğerlerinin db yi beklemesi sağlanır. Sırayla çalışabilmelerini sağlar
test: ["CMD-SHELL", "pg_isready", "-d", "db_prod"]
interval: 5s
timeout: 60s
retries: 10
start_period: 5s
api:
container_name: libraryapi
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000
restart: always
depends_on:
- migration
networks:
- restapi
migration:
image: ghcr.io/kukymbr/goose-docker:3.15.1
env_file:
- .env
depends_on:
db:
condition: 'service_healthy'
volumes:
- ./db/migrations/:/migrations
networks:
- restapi
volumes:
mylibdb:
networks:
restapi:
driver: bridge