-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
44 lines (41 loc) · 957 Bytes
/
docker-compose.yaml
File metadata and controls
44 lines (41 loc) · 957 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
services:
service:
build:
context: .
dockerfile: Dockerfile
depends_on:
db:
condition: service_healthy
container_name: ozon-test-service
env_file:
- .env
environment:
- STORAGE_TYPE=postgres
ports:
- "${SERVICE_PORT}:${SERVICE_PORT}"
networks:
- ozon-test-task-postgres
db:
image: postgres:latest
env_file:
- .env
container_name: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
networks:
- ozon-test-task-postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
networks:
ozon-test-task-postgres:
volumes:
postgres_data: