-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
65 lines (57 loc) · 1.24 KB
/
docker-compose.yaml
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
version: '3'
services:
db:
image: postgres:latest
container_name: avtio_test_task_db
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- POSTGRES_HOST=${DB_HOST}
- POSTGRES_SSLMODE=${DB_SSLMODE}
ports:
- '5432:5432'
volumes:
- ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- db_data:/var/lib/postgresql/data22
networks:
- test_task
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 20s
timeout: 5s
retries: 5
app:
container_name: avito_test_task_app
build: .
ports:
- 8080:8080
volumes:
- api:/go/scr/app/
depends_on:
- db
networks:
- test_task
restart: on-failure
links:
- db
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin_container
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
depends_on:
- db
ports:
- "5050:80"
networks:
- test_task
restart: unless-stopped
volumes:
api:
docker-entrypoint-initdb.d:
db_data:
networks:
test_task:
driver: bridge