-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (84 loc) · 2.05 KB
/
docker-compose.yml
File metadata and controls
89 lines (84 loc) · 2.05 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: "3.9"
services:
postgres:
container_name: postgres_container_to_cocktaility
image: postgres:17.2
secrets:
- db_user
- db_password
environment:
POSTGRES_DB: "CockDB"
POSTGRES_USER_FILE: /run/secrets/db_user
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
PGDATA: "/var/lib/postgresql/data/pgdata"
POSTGRES_INITDB_ARGS: "--locale-provider=icu --icu-locale=ru-RU"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$(cat /run/secrets/db_user) -d CockDB" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
deploy:
resources:
limits:
cpus: '1'
memory: 4G
ports:
- "5432:5432"
networks:
- postgres
pgadmin:
container_name: pgadmin_container_to_cocktaility
image: dpage/pgadmin4:8.13
secrets:
- pgadmin_password
environment:
PGADMIN_DEFAULT_PASSWORD: /run/secrets/pgadmin_password
PGADMIN_CONFIG_SERVER_MODE: "False"
volumes:
- pgadmin-data:/var/lib/pgadmin
ports:
- "5050:80"
restart: unless-stopped
deploy:
resources:
limits:
cpus: '0.5'
memory: 1G
networks:
- postgres
webapi:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./API/wwwroot:/app/wwwroot
secrets:
- db_password
environment:
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:5184"
DB_CONNECTION_STRING: "Host=postgres;Database=CockDB;Username_FILE=/run/secrets/db_user;Password_FILE=/run/secrets/db_password;"
depends_on:
postgres:
condition: service_healthy
ports:
- "5184:5184"
networks:
- postgres
volumes:
postgres_data:
pgadmin-data:
networks:
postgres:
driver: bridge
secrets:
db_password:
file: ./secrets/db_password.txt
db_user:
file: ./secrets/db_user.txt
pgadmin_password:
file: ./secrets/pgadmin_password.txt