dockerize app

This commit is contained in:
Matteo Rosati
2026-01-20 10:46:14 +01:00
parent eb627047e5
commit 7df1b9f718
5 changed files with 437 additions and 0 deletions

32
docker-compose.yml Normal file
View File

@@ -0,0 +1,32 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: akern-genai-app
ports:
- "${PORT:-8000}:8000"
environment:
# Application configuration
- PORT=${PORT:-8000}
- HOST=${HOST:-0.0.0.0}
- WORKERS=${WORKERS:-1}
- LOG_LEVEL=${LOG_LEVEL:-info}
# Google GenAI configuration (load from .env file)
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://${HOST:-127.0.0.1}:${PORT:-8000}/",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s