-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (31 loc) · 844 Bytes
/
docker-compose.yml
File metadata and controls
33 lines (31 loc) · 844 Bytes
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
version: "3.8"
services:
db:
image: postgres:14
environment:
POSTGRES_DB: fastapitimetable
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql://postgres:postgres@db:5432/fastapitimetable
SECRET_KEY: f6ef82446b940077e6c35222a4a2ea00bdf13e17ee091a02e1b1d2afae076fa2e7a7accd7c277f13a250c173ed87771da62225b3898b877e2a5b460eee4d705d
ACCESS_TOKEN_EXPIRE_MINUTES: "15"
REFRESH_TOKEN_EXPIRE_DAYS: "7"
depends_on:
- db
restart: on-failure
volumes:
pgdata: