generated from one-zero-eight/fastapi-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
48 lines (43 loc) · 1.18 KB
/
docker-compose.yaml
File metadata and controls
48 lines (43 loc) · 1.18 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
# This is a Docker Compose configuration for local use.
# Run all services:
# docker compose up --build --wait
services:
bot:
build:
context: .
dockerfile: Dockerfile
restart: no
depends_on:
- redis # Wait for the database to be ready before starting the application
volumes:
- "./settings.yaml:/app/settings.yaml:ro" # Read-only settings file
environment:
TZ: Europe/Moscow # Set the timezone for correct calendar image generation
db:
# See more: https://hub.docker.com/_/postgres
image: "postgres:17.1"
restart: no
ports:
- "5432:5432"
volumes:
- "postgres:/var/lib/postgresql/data"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
timeout: 5s
start_period: 30s
interval: 1m
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
redis:
# See more: https://hub.docker.com/_/redis
image: "redis:7.2.4-alpine"
restart: no
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
ports:
- "6379:6379"
volumes:
- "redis:/data"
- "./redis/redis.conf:/usr/local/etc/redis/redis.conf"
volumes:
postgres:
redis: