generated from yandex-praktikum/go-musthave-diploma-tpl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
39 lines (37 loc) · 977 Bytes
/
compose.yaml
File metadata and controls
39 lines (37 loc) · 977 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
services:
gophermart-app:
container_name: gophermart-app
image: rusinov/gophermart-app
command: "go run cmd/gophermart/main.go"
depends_on:
gophermart-db:
condition: service_healthy
working_dir: /app
volumes:
- "./:/app"
ports:
- "7777:7777"
env_file:
- .env
build:
dockerfile: Dockerfile
gophermart-db:
container_name: gophermart-db
image: postgres:17
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off", "-c", "max_connections=1000"]
volumes:
- data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -h127.0.0.1 -Ugophermart" ]
interval: 5s
timeout: 3s
retries: 3
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=gophermart
- POSTGRES_USER=gophermart
- POSTGRES_DB=gophermart
- PGDATA=/var/lib/postgresql/data
volumes:
data: { }