docker compose exemplified, .env integration

This commit is contained in:
Reindl David (IT-PTR-CEN2-SL10) committed 2026-10-07 18:59:58 +02:00
1 parent b1284f6fa9
commit 42ef989fb7
6 files changed
+22 -5

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
services:
password-generator:
build:
context: .
dockerfile: Dockerfile
image: pw-generator:local
container_name: pw-generator
restart: unless-stopped
ports:
- "8080:8080"
env_file:
- .env
environment:
APP_ENV: production
APP_DEBUG: "false"
LOG_LEVEL: warning
PORT: "8080"
RATE_LIMIT: "120"
CORS_ORIGIN: "http://localhost:8080"
CORS_METHODS: "GET,POST,OPTIONS"
CORS_HEADERS: "Content-Type,Authorization"
volumes:
- ./.env:/var/www/html/.env:ro
- ./logs:/var/www/html/logs
- ./config/config.json:/var/www/html/config/config.json:ro
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8080/ >/dev/null || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s