feat: Prepare Zemailnator for Dokploy deployment
- Add highly optimized Dockerfile with Nginx and PHP-FPM 8.4 - Add docker-compose.yml configured with Redis and MariaDB 10.11 - Implement entrypoint.sh and supervisord.conf for background workers - Refactor legacy IMAP scripts into scheduled Artisan Commands - Secure app by removing old routes with hardcoded basic auth credentials - Configure email attachments to use Laravel Storage instead of insecure public/tmp
This commit is contained in:
61
docker-compose.yml
Normal file
61
docker-compose.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${APP_PORT:-8000}:80"
|
||||
environment:
|
||||
- APP_ENV=${APP_ENV:-production}
|
||||
- APP_DEBUG=${APP_DEBUG:-false}
|
||||
- APP_URL=${APP_URL}
|
||||
- DB_CONNECTION=${DB_CONNECTION:-mysql}
|
||||
- DB_HOST=${DB_HOST:-mariadb}
|
||||
- DB_PORT=${DB_PORT:-3306}
|
||||
- DB_DATABASE=${DB_DATABASE:-zemail}
|
||||
- DB_USERNAME=${DB_USERNAME:-zemail_user}
|
||||
- DB_PASSWORD=${DB_PASSWORD:-secret}
|
||||
- CACHE_STORE=${CACHE_STORE:-redis}
|
||||
- QUEUE_CONNECTION=${QUEUE_CONNECTION:-redis}
|
||||
- SESSION_DRIVER=${SESSION_DRIVER:-redis}
|
||||
- REDIS_HOST=${REDIS_HOST:-redis}
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-null}
|
||||
- REDIS_PORT=${REDIS_PORT:-6379}
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://localhost/health" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
volumes:
|
||||
- app-storage:/var/www/storage
|
||||
- app-public-tmp:/var/www/public/tmp
|
||||
depends_on:
|
||||
- redis
|
||||
- mariadb
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
|
||||
mariadb:
|
||||
image: mariadb:10.11
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- MYSQL_DATABASE=${DB_DATABASE:-zemail}
|
||||
- MYSQL_USER=${DB_USERNAME:-zemail_user}
|
||||
- MYSQL_PASSWORD=${DB_PASSWORD:-secret}
|
||||
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD:-rootsecret}
|
||||
volumes:
|
||||
- mariadb-data:/var/lib/mysql
|
||||
|
||||
volumes:
|
||||
app-storage:
|
||||
app-public-tmp:
|
||||
redis-data:
|
||||
mariadb-data:
|
||||
Reference in New Issue
Block a user