add docker

This commit is contained in:
fiatcode 2025-10-20 08:18:02 +07:00
parent dcb2b5ee53
commit e9d703ec7c
10 changed files with 316 additions and 25 deletions

29
compose.yaml Normal file
View file

@ -0,0 +1,29 @@
services:
quote-api:
build: .
restart: unless-stopped
ports:
- '8080:8080'
env_file:
- .env
volumes:
- ./quotes.db:/app/quotes.db:ro
healthcheck:
test:
[
'CMD',
'wget',
'--quiet',
'--tries=1',
'--spider',
'http://localhost:8080/health',
]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '3'