-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
42 lines (38 loc) · 1.24 KB
/
docker-compose.yaml
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
# This is a Docker Compose configuration for local use.
# In production use docker-compose.prod.yaml
# Run all services:
# docker compose up --build --detach
services:
api:
build: . # See Dockerfile for more details
depends_on:
db:
# Wait for the database to be ready before starting the application
condition: service_healthy
restart: always
ports:
- "8000:8000"
volumes:
- "./predefined:/code/predefined:rw" # Read-write predefined data
- "./settings.yaml:/code/settings.yaml:ro" # Read-only settings file
env_file: .env # You can specify some Uvicorn settings in .env file
environment:
- TZ=Europe/Moscow # Set the timezone for correct calendar image generation
db:
# See more: https://hub.docker.com/_/postgres
image: "postgres:16.4"
restart: always
# The commits were slow on our servers, so we turned off the synchronous_commit
command: postgres -c synchronous_commit=off
volumes:
- "postgres:/var/lib/postgresql/data"
ports:
- "5432:5432"
env_file: .env # Set POSTGRES_PASSWORD in .env file
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres: