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

56
docker/supervisord.conf Normal file
View File

@@ -0,0 +1,56 @@
[supervisord]
nodaemon=true
user=root
logfile=/dev/null
logfile_maxbytes=0
pidfile=/run/supervisord.pid
[unix_http_server]
file=/run/supervisor.sock
[supervisorctl]
serverurl=unix:///run/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
; ── Nginx ─────────────────────────────────────────────────────────────────
[program:nginx]
command=nginx -g "daemon off;"
autostart=true
autorestart=true
priority=10
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
; ── PHP-FPM ───────────────────────────────────────────────────────────────
[program:php-fpm]
command=php-fpm --nodaemonize
autostart=true
autorestart=true
priority=5
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
; ── Laravel Queue Worker ──────────────────────────────────────────────────
[program:queue]
command=php /var/www/html/artisan queue:work \
--sleep=3 \
--tries=3 \
--max-time=3600 \
--queue=default
directory=/var/www/html
user=www-data
autostart=true
autorestart=true
priority=20
numprocs=1
startsecs=5
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0