-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
66 lines (60 loc) · 1.45 KB
/
docker-compose.yml
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
version: "3.8"
services:
postgresql:
container_name: budget-graph-postgres
image: postgres:16.2-alpine3.18
secrets:
- db-password
environment:
POSTGRES_DB: "budget_graph"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: /run/secrets/db-password
PGDATA: "/var/lib/postgresql/data/pgdata"
ports:
- "6432:5432"
restart: always
networks:
- postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 10s
timeout: 5s
retries: 5
# pgadmin: # pgAdmin running in server mode over HTTP or HTTPS
# container_name: pgadmin_container
# image: dpage/pgadmin4:8.14
# secrets:
# - pgadmin-email
# - pgadmin-password
# environment:
# PGADMIN_DEFAULT_EMAIL: =/run/secrets/pgadmin-email
# PGADMIN_DEFAULT_PASSWORD: =/run/secrets/pgadmin-password
# PGADMIN_CONFIG_SERVER_MODE: "False"
# volumes:
# - pgadmin-data:/var/lib/pgadmin
# ports:
# - "5050:80"
# restart: unless-stopped
# networks:
# - postgres
bot:
build:
context: .
dockerfile: Dockerfile-bot
restart: always
secrets:
- db-password
networks:
- postgres
networks:
postgres:
driver: bridge
secrets:
db-password:
file: db_auth/psq_psw.env
pgadmin-email:
file: db_auth/pg_admin_email.env
pgadmin-password:
file: db_auth/pg_admin_psw.env
volumes:
pgadmin-data: