blob: ccaf70eee2b7283efb6605ec7144ffb9930b76d5 (
plain)
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
|
networks:
edge_net:
name: ${EDGE_NET}
external: true
db_net:
name: ${DB_NET}
external: true
volumes:
db-data:
name: ${DB_VOLUME}
external: true
secrets:
DB_PASSWORD:
file: '/srv/secrets/DB_PASSWORD'
services:
db:
image: postgres:16
restart: unless-stopped
secrets: ['DB_USER', 'DB_PASSWORD']
environment:
POSTGRES_USER_FILE: '/run/secrets/DB_USER'
POSTGRES_PASSWORD_FILE: /run/secrets/DB_PASSWORD
env_file:
- ${SECRETS}/env/db.env
user: '${UID}:${GID}'
volumes:
- db-data:/var/lib/postgresql/data
networks:
- db_net
expose:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
retries: 5
dba:
container_name: ${DBA_CONTAINER}
image: adminer:latest
environment:
ADMINER_DEFAULT_SERVER: db
ADMINER_DESIGN: galkaev
env_file:
- .run.env
- .env
depends_on:
- db
networks:
- edge_net
- db_net
expose:
- 8080
|