-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (64 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
70 lines (64 loc) · 1.64 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
version: "3.8"
services:
tg_bot:
image: tg_bot
container_name: bot_container
build:
context: ./bot
environment:
PROD: $PROD
CLIENT_TOKEN: $CLIENT_TOKEN
ADMIN_TOKEN: $ADMIN_TOKEN
DB_URL: "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/postgresdb"
volumes:
- ./resources/bot:/bot/bot_data
depends_on:
postgres:
condition: service_healthy
migrations:
condition: service_completed_successfully
migrations:
image: tg_bot
build:
context: ./bot
depends_on:
postgres:
condition: service_healthy
environment:
PROD: $PROD
DB_URL: "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/postgresdb"
volumes:
- ./bot/alembic:/bot/alembic
restart: "no"
entrypoint: [ "./make_migrations.sh" ]
postgres:
image: library/postgres:14.2-alpine
container_name: postgres_container
environment:
POSTGRES_DB: "postgresdb"
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
PGDATA: "/var/lib/postgresql/data/pgdata"
volumes:
- ./resources/db:/var/lib/postgresql/data
# ports:
# - "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $POSTGRES_USER -d postgresdb" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: always
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin_container
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: root
ports:
- "5050:80"
volumes:
grafana-data:
external: true