Add Docker support with Dockerfile, docker-compose, and entrypoint script; update .gitignore and add .dockerignore

This commit is contained in:
I-Fun
2026-04-01 11:44:46 +07:00
parent e09c8a5fa9
commit 1126877ef5
8 changed files with 403 additions and 0 deletions

38
docker-compose.yml Normal file
View File

@@ -0,0 +1,38 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
image: kol-manager:latest
container_name: kol-manager
restart: unless-stopped
ports:
- "${APP_PORT:-8080}:80"
# Mount .env.docker as the runtime .env
env_file:
- .env.docker
volumes:
# Persist the SQLite database across container rebuilds
- kol_database:/var/www/html/database
# Persist uploaded files (talent assets, etc.)
- kol_storage:/var/www/html/storage
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/up"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
# Named volume for SQLite database
kol_database:
driver: local
# Named volume for all file uploads / logs / cache
kol_storage:
driver: local