mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 20:52:14 +01:00
Updated docker image
This commit is contained in:
@@ -1,47 +1,30 @@
|
|||||||
# Accepted values: 8.3 - 8.2
|
|
||||||
ARG PHP_VERSION=8.3
|
ARG PHP_VERSION=8.3
|
||||||
|
ARG FRANKENPHP_VERSION=1.8
|
||||||
ARG FRANKENPHP_VERSION=latest
|
ARG COMPOSER_VERSION=2.8
|
||||||
|
ARG BUN_VERSION="latest"
|
||||||
ARG COMPOSER_VERSION=latest
|
ARG APP_ENV
|
||||||
|
|
||||||
ARG DOCKER_FILES_BASE_PATH="docker/prod/"
|
ARG DOCKER_FILES_BASE_PATH="docker/prod/"
|
||||||
|
|
||||||
###########################################
|
|
||||||
# Build frontend assets with NPM
|
|
||||||
###########################################
|
|
||||||
|
|
||||||
#ARG NODE_VERSION=20-alpine
|
|
||||||
#
|
|
||||||
#FROM node:${NODE_VERSION} AS build
|
|
||||||
#
|
|
||||||
#ENV ROOT=/var/www/html
|
|
||||||
#
|
|
||||||
#WORKDIR ${ROOT}
|
|
||||||
#
|
|
||||||
#RUN npm config set update-notifier false && npm set progress=false
|
|
||||||
#
|
|
||||||
#COPY package*.json ./
|
|
||||||
#
|
|
||||||
#RUN if [ -f $ROOT/package-lock.json ]; \
|
|
||||||
# then \
|
|
||||||
# npm ci --loglevel=error --no-audit; \
|
|
||||||
# else \
|
|
||||||
# npm install --loglevel=error --no-audit; \
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
#COPY . .
|
|
||||||
#
|
|
||||||
#RUN npm run build
|
|
||||||
|
|
||||||
###########################################
|
|
||||||
|
|
||||||
FROM composer:${COMPOSER_VERSION} AS vendor
|
FROM composer:${COMPOSER_VERSION} AS vendor
|
||||||
|
|
||||||
FROM dunglas/frankenphp:${FRANKENPHP_VERSION}-php${PHP_VERSION}
|
FROM dunglas/frankenphp:${FRANKENPHP_VERSION}-builder-php${PHP_VERSION} AS upstream
|
||||||
|
|
||||||
ARG DOCKER_FILES_BASE_PATH
|
COPY --from=caddy:builder /usr/bin/xcaddy /usr/bin/xcaddy
|
||||||
ARG TARGETPLATFORM
|
|
||||||
|
RUN CGO_ENABLED=1 \
|
||||||
|
XCADDY_SETCAP=1 \
|
||||||
|
XCADDY_GO_BUILD_FLAGS="-ldflags='-w -s' -tags=nobadger,nomysql,nopgx" \
|
||||||
|
CGO_CFLAGS=$(php-config --includes) \
|
||||||
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
||||||
|
xcaddy build \
|
||||||
|
--output /usr/local/bin/frankenphp \
|
||||||
|
--with github.com/dunglas/frankenphp=./ \
|
||||||
|
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
|
||||||
|
--with github.com/dunglas/caddy-cbrotli
|
||||||
|
|
||||||
|
FROM dunglas/frankenphp:${FRANKENPHP_VERSION}-php${PHP_VERSION} AS base
|
||||||
|
|
||||||
|
COPY --from=upstream /usr/local/bin/frankenphp /usr/local/bin/frankenphp
|
||||||
|
|
||||||
LABEL maintainer="solidtime <hello@solidtime.io>"
|
LABEL maintainer="solidtime <hello@solidtime.io>"
|
||||||
LABEL org.opencontainers.image.title="solidtime"
|
LABEL org.opencontainers.image.title="solidtime"
|
||||||
@@ -53,18 +36,22 @@ ARG WWWUSER=1000
|
|||||||
ARG WWWGROUP=1000
|
ARG WWWGROUP=1000
|
||||||
ARG TZ=UTC
|
ARG TZ=UTC
|
||||||
ARG APP_DIR=/var/www/html
|
ARG APP_DIR=/var/www/html
|
||||||
|
ARG APP_ENV
|
||||||
|
ARG APP_HOST
|
||||||
|
ARG DOCKER_FILES_BASE_PATH
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
TERM=xterm-color \
|
TERM=xterm-color \
|
||||||
WITH_HORIZON=false \
|
|
||||||
WITH_SCHEDULER=false \
|
|
||||||
OCTANE_SERVER=frankenphp \
|
OCTANE_SERVER=frankenphp \
|
||||||
|
TZ=${TZ} \
|
||||||
USER=octane \
|
USER=octane \
|
||||||
ROOT=${APP_DIR} \
|
ROOT=${APP_DIR} \
|
||||||
|
APP_ENV=${APP_ENV} \
|
||||||
COMPOSER_FUND=0 \
|
COMPOSER_FUND=0 \
|
||||||
COMPOSER_MAX_PARALLEL_HTTP=24 \
|
COMPOSER_MAX_PARALLEL_HTTP=24 \
|
||||||
XDG_CONFIG_HOME=${APP_DIR}/.config \
|
XDG_CONFIG_HOME=${APP_DIR}/.config \
|
||||||
XDG_DATA_HOME=${APP_DIR}/.data
|
XDG_DATA_HOME=${APP_DIR}/.data \
|
||||||
|
SERVER_NAME=${APP_HOST}
|
||||||
|
|
||||||
WORKDIR ${ROOT}
|
WORKDIR ${ROOT}
|
||||||
|
|
||||||
@@ -78,14 +65,16 @@ RUN apt-get update; \
|
|||||||
apt-get install -yqq --no-install-recommends --show-progress \
|
apt-get install -yqq --no-install-recommends --show-progress \
|
||||||
apt-utils \
|
apt-utils \
|
||||||
curl \
|
curl \
|
||||||
gcc \
|
|
||||||
wget \
|
wget \
|
||||||
nano \
|
vim \
|
||||||
|
git \
|
||||||
ncdu \
|
ncdu \
|
||||||
procps \
|
procps \
|
||||||
|
unzip \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
supervisor \
|
supervisor \
|
||||||
libsodium-dev \
|
libsodium-dev \
|
||||||
|
libbrotli-dev \
|
||||||
# Install PHP extensions (included with dunglas/frankenphp)
|
# Install PHP extensions (included with dunglas/frankenphp)
|
||||||
&& install-php-extensions \
|
&& install-php-extensions \
|
||||||
bz2 \
|
bz2 \
|
||||||
@@ -99,6 +88,8 @@ RUN apt-get update; \
|
|||||||
exif \
|
exif \
|
||||||
pdo_mysql \
|
pdo_mysql \
|
||||||
zip \
|
zip \
|
||||||
|
uv \
|
||||||
|
vips \
|
||||||
intl \
|
intl \
|
||||||
gd \
|
gd \
|
||||||
redis \
|
redis \
|
||||||
@@ -128,27 +119,34 @@ RUN arch="$(uname -m)" \
|
|||||||
|
|
||||||
RUN userdel --remove --force www-data \
|
RUN userdel --remove --force www-data \
|
||||||
&& groupadd --force -g ${WWWGROUP} ${USER} \
|
&& groupadd --force -g ${WWWGROUP} ${USER} \
|
||||||
&& useradd -ms /bin/bash --no-log-init --no-user-group -g ${WWWGROUP} -u ${WWWUSER} ${USER}
|
&& useradd -ms /bin/bash --no-log-init --no-user-group -g ${WWWGROUP} -u ${WWWUSER} ${USER} \
|
||||||
|
&& setcap -r /usr/local/bin/frankenphp
|
||||||
|
|
||||||
RUN chown -R ${USER}:${USER} ${ROOT} /var/{log,run} \
|
RUN chown -R ${USER}:${USER} ${ROOT} /var/{log,run} \
|
||||||
&& chmod -R a+rw ${ROOT} /var/{log,run}
|
&& chmod -R a+rw ${ROOT} /var/{log,run}
|
||||||
|
|
||||||
RUN cp ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini
|
RUN cp ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini
|
||||||
|
|
||||||
COPY --chown=${USER}:${USER} ${DOCKER_FILES_BASE_PATH}deployment/php.ini ${PHP_INI_DIR}/conf.d/99-octane-default.ini
|
|
||||||
COPY --chown=${USER}:${USER} ${DOCKER_FILES_BASE_PATH}deployment/php-arm.ini ${PHP_INI_DIR}/conf.d/99-octane-arm.ini
|
|
||||||
|
|
||||||
RUN echo "TARGETPLATFORM is equal to ${TARGETPLATFORM}"
|
|
||||||
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
|
|
||||||
rm ${PHP_INI_DIR}/conf.d/99-octane-default.ini; \
|
|
||||||
else \
|
|
||||||
rm ${PHP_INI_DIR}/conf.d/99-octane-arm.ini; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
USER ${USER}
|
USER ${USER}
|
||||||
|
|
||||||
COPY --chown=${USER}:${USER} --from=vendor /usr/bin/composer /usr/bin/composer
|
COPY --link --chown=${WWWUSER}:${WWWUSER} --from=vendor /usr/bin/composer /usr/bin/composer
|
||||||
#COPY --chown=${USER}:${USER} composer.json composer.lock ./
|
|
||||||
|
COPY --link --chown=${WWWUSER}:${WWWUSER} ${DOCKER_FILES_BASE_PATH}deployment/supervisord.conf /etc/
|
||||||
|
COPY --link --chown=${WWWUSER}:${WWWUSER} ${DOCKER_FILES_BASE_PATH}deployment/octane/FrankenPHP/supervisord.frankenphp.conf /etc/supervisor/conf.d/
|
||||||
|
COPY --link --chown=${WWWUSER}:${WWWUSER} ${DOCKER_FILES_BASE_PATH}deployment/supervisord.*.conf /etc/supervisor/conf.d/
|
||||||
|
COPY --link --chown=${WWWUSER}:${WWWUSER} ${DOCKER_FILES_BASE_PATH}deployment/start-container /usr/local/bin/start-container
|
||||||
|
COPY --link --chown=${WWWUSER}:${WWWUSER} ${DOCKER_FILES_BASE_PATH}deployment/healthcheck /usr/local/bin/healthcheck
|
||||||
|
COPY --link --chown=${WWWUSER}:${WWWUSER} ${DOCKER_FILES_BASE_PATH}deployment/php.ini ${PHP_INI_DIR}/conf.d/99-octane.ini
|
||||||
|
|
||||||
|
RUN chmod +x /usr/local/bin/start-container /usr/local/bin/healthcheck
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
#FROM base AS common
|
||||||
|
#
|
||||||
|
#USER ${USER}
|
||||||
|
#
|
||||||
|
#COPY --link --chown=${WWWUSER}:${WWWUSER} . .
|
||||||
#
|
#
|
||||||
#RUN composer install \
|
#RUN composer install \
|
||||||
# --no-dev \
|
# --no-dev \
|
||||||
@@ -158,22 +156,47 @@ COPY --chown=${USER}:${USER} --from=vendor /usr/bin/composer /usr/bin/composer
|
|||||||
# --no-scripts \
|
# --no-scripts \
|
||||||
# --audit
|
# --audit
|
||||||
|
|
||||||
COPY --chown=${USER}:${USER} . .
|
###########################################
|
||||||
#COPY --chown=${USER}:${USER} --from=build ${ROOT}/public public
|
# Build frontend assets with Bun
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
#FROM oven/bun:${BUN_VERSION} AS build
|
||||||
|
#
|
||||||
|
#ARG APP_ENV
|
||||||
|
#
|
||||||
|
#ENV ROOT=/var/www/html \
|
||||||
|
# APP_ENV=${APP_ENV} \
|
||||||
|
# NODE_ENV=${APP_ENV:-production}
|
||||||
|
#
|
||||||
|
#WORKDIR ${ROOT}
|
||||||
|
#
|
||||||
|
#COPY --link package.json bun.lock* ./
|
||||||
|
#
|
||||||
|
#RUN bun install --frozen-lockfile
|
||||||
|
#
|
||||||
|
#COPY --link . .
|
||||||
|
#COPY --link --from=common ${ROOT}/vendor vendor
|
||||||
|
#
|
||||||
|
#RUN bun run build
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
#FROM common AS runner
|
||||||
|
|
||||||
|
USER ${USER}
|
||||||
|
|
||||||
|
ENV WITH_HORIZON=false \
|
||||||
|
WITH_SCHEDULER=false \
|
||||||
|
WITH_REVERB=false
|
||||||
|
|
||||||
|
COPY --link --chown=${WWWUSER}:${WWWUSER} . .
|
||||||
|
#COPY --link --chown=${WWWUSER}:${WWWUSER} --from=build ${ROOT}/public public
|
||||||
|
|
||||||
RUN mkdir -p \
|
RUN mkdir -p \
|
||||||
storage/framework/{sessions,views,cache,testing} \
|
storage/framework/{sessions,views,cache,testing} \
|
||||||
storage/logs \
|
storage/logs \
|
||||||
bootstrap/cache && chmod -R a+rw storage
|
bootstrap/cache && chmod -R a+rw storage
|
||||||
|
|
||||||
COPY --chown=${USER}:${USER} ${DOCKER_FILES_BASE_PATH}deployment/supervisord.conf /etc/supervisor/
|
|
||||||
COPY --chown=${USER}:${USER} ${DOCKER_FILES_BASE_PATH}deployment/octane/FrankenPHP/supervisord.frankenphp.conf /etc/supervisor/conf.d/
|
|
||||||
COPY --chown=${USER}:${USER} ${DOCKER_FILES_BASE_PATH}deployment/supervisord.*.conf /etc/supervisor/conf.d/
|
|
||||||
COPY --chown=${USER}:${USER} ${DOCKER_FILES_BASE_PATH}deployment/start-container /usr/local/bin/start-container
|
|
||||||
|
|
||||||
# FrankenPHP embedded PHP configuration
|
|
||||||
COPY --chown=${USER}:${USER} ${DOCKER_FILES_BASE_PATH}deployment/php.ini /lib/php.ini
|
|
||||||
|
|
||||||
#RUN composer install \
|
#RUN composer install \
|
||||||
# --classmap-authoritative \
|
# --classmap-authoritative \
|
||||||
# --no-interaction \
|
# --no-interaction \
|
||||||
@@ -183,12 +206,9 @@ COPY --chown=${USER}:${USER} ${DOCKER_FILES_BASE_PATH}deployment/php.ini /lib/ph
|
|||||||
|
|
||||||
RUN cat .env
|
RUN cat .env
|
||||||
#RUN php artisan env
|
#RUN php artisan env
|
||||||
RUN php artisan storage:link
|
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/start-container
|
|
||||||
|
|
||||||
RUN cat ${DOCKER_FILES_BASE_PATH}deployment/utilities.sh >> ~/.bashrc
|
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
ENTRYPOINT ["start-container"]
|
ENTRYPOINT ["start-container"]
|
||||||
|
|
||||||
|
#HEALTHCHECK --start-period=5s --interval=2s --timeout=5s --retries=8 CMD healthcheck || exit 1
|
||||||
|
|||||||
35
docker/prod/deployment/healthcheck
Normal file
35
docker/prod/deployment/healthcheck
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
container_mode=${CONTAINER_MODE:-"http"}
|
||||||
|
|
||||||
|
if [ "${container_mode}" = "http" ]; then
|
||||||
|
php "${ROOT}/artisan" octane:status
|
||||||
|
elif [ "${container_mode}" = "horizon" ]; then
|
||||||
|
php "${ROOT}/artisan" horizon:status
|
||||||
|
elif [ "${container_mode}" = "scheduler" ]; then
|
||||||
|
if [ "$(supervisorctl status scheduler:scheduler_0 | awk '{print tolower($2)}')" = "running" ]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Healthcheck failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [ "${container_mode}" = "reverb" ]; then
|
||||||
|
if [ "$(supervisorctl status reverb:reverb_0 | awk '{print tolower($2)}')" = "running" ]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Healthcheck failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [ "${container_mode}" = "worker" ]; then
|
||||||
|
if [ "$(supervisorctl status worker:worker_0 | awk '{print tolower($2)}')" = "running" ]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Healthcheck failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Container mode mismatched."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
68
docker/prod/deployment/octane/FrankenPHP/Caddyfile
Normal file
68
docker/prod/deployment/octane/FrankenPHP/Caddyfile
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
{$CADDY_GLOBAL_OPTIONS}
|
||||||
|
|
||||||
|
admin {$CADDY_SERVER_ADMIN_HOST}:{$CADDY_SERVER_ADMIN_PORT}
|
||||||
|
|
||||||
|
frankenphp {
|
||||||
|
worker "{$APP_PUBLIC_PATH}/frankenphp-worker.php" {$CADDY_SERVER_WORKER_COUNT}
|
||||||
|
}
|
||||||
|
|
||||||
|
metrics {
|
||||||
|
per_host
|
||||||
|
}
|
||||||
|
|
||||||
|
servers {
|
||||||
|
protocols h1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{$CADDY_EXTRA_CONFIG}
|
||||||
|
|
||||||
|
{$CADDY_SERVER_SERVER_NAME} {
|
||||||
|
log {
|
||||||
|
level WARN
|
||||||
|
|
||||||
|
format filter {
|
||||||
|
wrap {$CADDY_SERVER_LOGGER}
|
||||||
|
fields {
|
||||||
|
uri query {
|
||||||
|
replace authorization REDACTED
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
route {
|
||||||
|
root * "{$APP_PUBLIC_PATH}"
|
||||||
|
encode zstd br gzip
|
||||||
|
|
||||||
|
{$CADDY_SERVER_EXTRA_DIRECTIVES}
|
||||||
|
|
||||||
|
request_body {
|
||||||
|
max_size 500MB
|
||||||
|
}
|
||||||
|
|
||||||
|
@static {
|
||||||
|
file
|
||||||
|
path *.js *.css *.jpg *.jpeg *.webp *.weba *.webm *.gif *.png *.ico *.cur *.gz *.svg *.svgz *.mp4 *.mp3 *.ogg *.ogv *.htc *.woff2 *.woff
|
||||||
|
}
|
||||||
|
|
||||||
|
@staticshort {
|
||||||
|
file
|
||||||
|
path *.json *.xml *.rss
|
||||||
|
}
|
||||||
|
|
||||||
|
header @static Cache-Control "public, immutable, stale-while-revalidate, max-age=31536000"
|
||||||
|
|
||||||
|
header @staticshort Cache-Control "no-cache, max-age=3600"
|
||||||
|
|
||||||
|
@rejected `path('*.bak', '*.conf', '*.dist', '*.fla', '*.ini', '*.inc', '*.inci', '*.log', '*.orig', '*.psd', '*.sh', '*.sql', '*.swo', '*.swp', '*.swop', '*/.*') && !path('*/.well-known/*')`
|
||||||
|
error @rejected 401
|
||||||
|
|
||||||
|
php_server {
|
||||||
|
index frankenphp-worker.php
|
||||||
|
try_files {path} frankenphp-worker.php
|
||||||
|
resolve_root_symlink
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,51 +1,65 @@
|
|||||||
[program:octane]
|
[program:octane]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name = %(program_name)s_%(process_num)s
|
||||||
command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=0.0.0.0 --port=8000 --admin-port=2019
|
command = php %(ENV_ROOT)s/artisan octane:frankenphp --host=0.0.0.0 --port=8000 --admin-port=2019 --caddyfile=%(ENV_ROOT)s/docker/prod/deployment/octane/FrankenPHP/Caddyfile
|
||||||
; command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=localhost --port=443 --admin-port=2019 --https --http-redirect
|
user = %(ENV_USER)s
|
||||||
user=%(ENV_USER)s
|
priority = 1
|
||||||
autostart=true
|
autostart = true
|
||||||
autorestart=true
|
autorestart = true
|
||||||
environment=LARAVEL_OCTANE="1"
|
environment = LARAVEL_OCTANE = "1"
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile = /dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes = 0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile = /dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes = 0
|
||||||
|
|
||||||
[program:horizon]
|
[program:horizon]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name = %(program_name)s_%(process_num)s
|
||||||
command=php %(ENV_ROOT)s/artisan horizon
|
command = php %(ENV_ROOT)s/artisan horizon
|
||||||
user=%(ENV_USER)s
|
user = %(ENV_USER)s
|
||||||
autostart=%(ENV_WITH_HORIZON)s
|
priority = 3
|
||||||
autorestart=true
|
autostart = %(ENV_WITH_HORIZON)s
|
||||||
stdout_logfile=%(ENV_ROOT)s/storage/logs/horizon.log
|
autorestart = true
|
||||||
stdout_logfile_maxbytes=200MB
|
stdout_logfile = %(ENV_ROOT)s/storage/logs/horizon.log
|
||||||
stderr_logfile=%(ENV_ROOT)s/storage/logs/horizon.log
|
stdout_logfile_maxbytes = 200MB
|
||||||
stderr_logfile_maxbytes=200MB
|
stderr_logfile = %(ENV_ROOT)s/storage/logs/horizon.log
|
||||||
stopwaitsecs=3600
|
stderr_logfile_maxbytes = 200MB
|
||||||
|
stopwaitsecs = 3600
|
||||||
|
|
||||||
[program:scheduler]
|
[program:scheduler]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name = %(program_name)s_%(process_num)s
|
||||||
command=supercronic -overlapping /etc/supercronic/laravel
|
command = supercronic -overlapping /etc/supercronic/laravel
|
||||||
user=%(ENV_USER)s
|
user = %(ENV_USER)s
|
||||||
autostart=%(ENV_WITH_SCHEDULER)s
|
autostart = %(ENV_WITH_SCHEDULER)s
|
||||||
autorestart=true
|
autorestart = true
|
||||||
stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
stdout_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log
|
||||||
stdout_logfile_maxbytes=200MB
|
stdout_logfile_maxbytes = 200MB
|
||||||
stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
stderr_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log
|
||||||
stderr_logfile_maxbytes=200MB
|
stderr_logfile_maxbytes = 200MB
|
||||||
|
|
||||||
[program:clear-scheduler-cache]
|
[program:clear-scheduler-cache]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name = %(program_name)s_%(process_num)s
|
||||||
command=php %(ENV_ROOT)s/artisan schedule:clear-cache
|
command = php %(ENV_ROOT)s/artisan schedule:clear-cache
|
||||||
user=%(ENV_USER)s
|
user = %(ENV_USER)s
|
||||||
autostart=%(ENV_WITH_SCHEDULER)s
|
autostart = %(ENV_WITH_SCHEDULER)s
|
||||||
autorestart=false
|
autorestart = false
|
||||||
startsecs=0
|
startsecs = 0
|
||||||
startretries=1
|
startretries = 1
|
||||||
stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
stdout_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log
|
||||||
stdout_logfile_maxbytes=200MB
|
stdout_logfile_maxbytes = 200MB
|
||||||
stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
stderr_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log
|
||||||
stderr_logfile_maxbytes=200MB
|
stderr_logfile_maxbytes = 200MB
|
||||||
|
|
||||||
|
[program:reverb]
|
||||||
|
process_name = %(program_name)s_%(process_num)s
|
||||||
|
command = php %(ENV_ROOT)s/artisan reverb:start
|
||||||
|
user = %(ENV_USER)s
|
||||||
|
priority = 2
|
||||||
|
autostart = %(ENV_WITH_REVERB)s
|
||||||
|
autorestart = true
|
||||||
|
stdout_logfile = %(ENV_ROOT)s/storage/logs/reverb.log
|
||||||
|
stdout_logfile_maxbytes = 200MB
|
||||||
|
stderr_logfile = %(ENV_ROOT)s/storage/logs/reverb.log
|
||||||
|
stderr_logfile_maxbytes = 200MB
|
||||||
|
minfds = 10000
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
files=/etc/supervisor/supervisord.conf
|
files = /etc/supervisord.conf
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
version: '2.7'
|
|
||||||
rpc:
|
|
||||||
listen: 'tcp://127.0.0.1:6001'
|
|
||||||
server:
|
|
||||||
relay: pipes
|
|
||||||
http:
|
|
||||||
middleware: [ "static", "gzip", "headers" ]
|
|
||||||
max_request_size: 20
|
|
||||||
static:
|
|
||||||
dir: "public"
|
|
||||||
forbid: [ ".php", ".htaccess" ]
|
|
||||||
uploads:
|
|
||||||
forbid: [".php", ".exe", ".bat", ".sh"]
|
|
||||||
pool:
|
|
||||||
allocate_timeout: 10s
|
|
||||||
destroy_timeout: 10s
|
|
||||||
supervisor:
|
|
||||||
max_worker_memory: 128
|
|
||||||
exec_ttl: 60s
|
|
||||||
logs:
|
|
||||||
mode: production
|
|
||||||
level: debug
|
|
||||||
encoding: json
|
|
||||||
status:
|
|
||||||
address: localhost:2114
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
[program:octane]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=php %(ENV_ROOT)s/artisan octane:start --server=roadrunner --host=0.0.0.0 --port=8000 --rpc-port=6001 --rr-config=%(ENV_ROOT)s/.rr.yaml
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=true
|
|
||||||
autorestart=true
|
|
||||||
environment=LARAVEL_OCTANE="1"
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
|
|
||||||
[program:horizon]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=php %(ENV_ROOT)s/artisan horizon
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=%(ENV_WITH_HORIZON)s
|
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=%(ENV_ROOT)s/storage/logs/horizon.log
|
|
||||||
stdout_logfile_maxbytes=200MB
|
|
||||||
stderr_logfile=%(ENV_ROOT)s/storage/logs/horizon.log
|
|
||||||
stderr_logfile_maxbytes=200MB
|
|
||||||
stopwaitsecs=3600
|
|
||||||
|
|
||||||
[program:scheduler]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=supercronic -overlapping /etc/supercronic/laravel
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=%(ENV_WITH_SCHEDULER)s
|
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
|
||||||
stdout_logfile_maxbytes=200MB
|
|
||||||
stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
|
||||||
stderr_logfile_maxbytes=200MB
|
|
||||||
|
|
||||||
[program:clear-scheduler-cache]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=php %(ENV_ROOT)s/artisan schedule:clear-cache
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=%(ENV_WITH_SCHEDULER)s
|
|
||||||
autorestart=false
|
|
||||||
startsecs=0
|
|
||||||
startretries=1
|
|
||||||
stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
|
||||||
stdout_logfile_maxbytes=200MB
|
|
||||||
stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
|
||||||
stderr_logfile_maxbytes=200MB
|
|
||||||
|
|
||||||
[include]
|
|
||||||
files=/etc/supervisor/supervisord.conf
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
[program:octane]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=php %(ENV_ROOT)s/artisan octane:start --server=swoole --host=0.0.0.0 --port=8000
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=true
|
|
||||||
autorestart=true
|
|
||||||
environment=LARAVEL_OCTANE="1"
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
|
|
||||||
[program:horizon]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=php %(ENV_ROOT)s/artisan horizon
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=%(ENV_WITH_HORIZON)s
|
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=%(ENV_ROOT)s/storage/logs/horizon.log
|
|
||||||
stdout_logfile_maxbytes=200MB
|
|
||||||
stderr_logfile=%(ENV_ROOT)s/storage/logs/horizon.log
|
|
||||||
stderr_logfile_maxbytes=200MB
|
|
||||||
stopwaitsecs=3600
|
|
||||||
|
|
||||||
[program:scheduler]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=supercronic -overlapping /etc/supercronic/laravel
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=%(ENV_WITH_SCHEDULER)s
|
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
|
||||||
stdout_logfile_maxbytes=200MB
|
|
||||||
stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
|
||||||
stderr_logfile_maxbytes=200MB
|
|
||||||
|
|
||||||
[program:clear-scheduler-cache]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=php %(ENV_ROOT)s/artisan schedule:clear-cache
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=%(ENV_WITH_SCHEDULER)s
|
|
||||||
autorestart=false
|
|
||||||
startsecs=0
|
|
||||||
startretries=1
|
|
||||||
stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
|
||||||
stdout_logfile_maxbytes=200MB
|
|
||||||
stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log
|
|
||||||
stderr_logfile_maxbytes=200MB
|
|
||||||
|
|
||||||
[include]
|
|
||||||
files=/etc/supervisor/supervisord.conf
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
[PHP]
|
|
||||||
post_max_size = 100M
|
|
||||||
upload_max_filesize = 100M
|
|
||||||
expose_php = 0
|
|
||||||
realpath_cache_size = 16M
|
|
||||||
realpath_cache_ttl = 360
|
|
||||||
max_input_time = 5
|
|
||||||
|
|
||||||
[Opcache]
|
|
||||||
opcache.enable = 1
|
|
||||||
opcache.enable_cli = 1
|
|
||||||
opcache.memory_consumption = 256M
|
|
||||||
opcache.use_cwd = 0
|
|
||||||
opcache.max_file_size = 0
|
|
||||||
opcache.max_accelerated_files = 32531
|
|
||||||
opcache.validate_timestamps = 0
|
|
||||||
opcache.file_update_protection = 0
|
|
||||||
opcache.interned_strings_buffer = 16
|
|
||||||
opcache.file_cache = 60
|
|
||||||
|
|
||||||
[JIT]
|
|
||||||
opcache.jit_buffer_size = 128M
|
|
||||||
opcache.jit = disable
|
|
||||||
opcache.jit_prof_threshold = 0.001
|
|
||||||
opcache.jit_max_root_traces = 2048
|
|
||||||
opcache.jit_max_side_traces = 256
|
|
||||||
|
|
||||||
[zlib]
|
|
||||||
zlib.output_compression = On
|
|
||||||
zlib.output_compression_level = 9
|
|
||||||
@@ -5,6 +5,8 @@ expose_php = 0
|
|||||||
realpath_cache_size = 16M
|
realpath_cache_size = 16M
|
||||||
realpath_cache_ttl = 360
|
realpath_cache_ttl = 360
|
||||||
max_input_time = 5
|
max_input_time = 5
|
||||||
|
register_argc_argv = 0
|
||||||
|
date.timezone = ${TZ:-UTC}
|
||||||
|
|
||||||
[Opcache]
|
[Opcache]
|
||||||
opcache.enable = 1
|
opcache.enable = 1
|
||||||
@@ -16,7 +18,6 @@ opcache.max_accelerated_files = 32531
|
|||||||
opcache.validate_timestamps = 0
|
opcache.validate_timestamps = 0
|
||||||
opcache.file_update_protection = 0
|
opcache.file_update_protection = 0
|
||||||
opcache.interned_strings_buffer = 16
|
opcache.interned_strings_buffer = 16
|
||||||
opcache.file_cache = 60
|
|
||||||
|
|
||||||
[JIT]
|
[JIT]
|
||||||
opcache.jit_buffer_size = 128M
|
opcache.jit_buffer_size = 128M
|
||||||
|
|||||||
@@ -4,41 +4,49 @@ set -e
|
|||||||
container_mode=${CONTAINER_MODE:-"http"}
|
container_mode=${CONTAINER_MODE:-"http"}
|
||||||
octane_server=${OCTANE_SERVER}
|
octane_server=${OCTANE_SERVER}
|
||||||
auto_db_migrate=${AUTO_DB_MIGRATE:-false}
|
auto_db_migrate=${AUTO_DB_MIGRATE:-false}
|
||||||
echo "Container mode: $container_mode"
|
|
||||||
|
|
||||||
initialStuff() {
|
initialStuff() {
|
||||||
|
echo "Container mode: $container_mode"
|
||||||
|
|
||||||
if [ ${auto_db_migrate} = "true" ]; then
|
if [ ${auto_db_migrate} = "true" ]; then
|
||||||
echo "Auto database migration enabled."
|
echo "Auto database migration enabled."
|
||||||
php artisan migrate --isolated --force
|
php artisan migrate --isolated --force
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
php artisan storage:link; \
|
||||||
php artisan optimize:clear; \
|
php artisan optimize:clear; \
|
||||||
php artisan event:cache; \
|
php artisan optimize;
|
||||||
php artisan config:cache; \
|
|
||||||
php artisan route:cache;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$1" != "" ]; then
|
if [ "$1" != "" ]; then
|
||||||
exec "$@"
|
exec "$@"
|
||||||
elif [ ${container_mode} = "http" ]; then
|
elif [ "${container_mode}" = "http" ]; then
|
||||||
echo "Octane Server: $octane_server"
|
|
||||||
initialStuff
|
initialStuff
|
||||||
if [ ${octane_server} = "frankenphp" ]; then
|
echo "Octane Server: $octane_server"
|
||||||
|
if [ "${octane_server}" = "frankenphp" ]; then
|
||||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.frankenphp.conf
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.frankenphp.conf
|
||||||
elif [ ${octane_server} = "swoole" ]; then
|
elif [ "${octane_server}" = "swoole" ]; then
|
||||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.swoole.conf
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.swoole.conf
|
||||||
elif [ ${octane_server} = "roadrunner" ]; then
|
elif [ "${octane_server}" = "roadrunner" ]; then
|
||||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.roadrunner.conf
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.roadrunner.conf
|
||||||
else
|
else
|
||||||
echo "Invalid Octane server supplied."
|
echo "Invalid Octane server supplied."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [ ${container_mode} = "horizon" ]; then
|
elif [ "${container_mode}" = "horizon" ]; then
|
||||||
initialStuff
|
initialStuff
|
||||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.horizon.conf
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.horizon.conf
|
||||||
elif [ ${container_mode} = "scheduler" ]; then
|
elif [ "${container_mode}" = "reverb" ]; then
|
||||||
|
initialStuff
|
||||||
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.reverb.conf
|
||||||
|
elif [ "${container_mode}" = "scheduler" ]; then
|
||||||
initialStuff
|
initialStuff
|
||||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.scheduler.conf
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.scheduler.conf
|
||||||
elif [ ${container_mode} = "worker" ]; then
|
elif [ "${container_mode}" = "worker" ]; then
|
||||||
|
if [ -z "${WORKER_COMMAND}" ]; then
|
||||||
|
echo "WORKER_COMMAND is undefined."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
initialStuff
|
initialStuff
|
||||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.worker.conf
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.worker.conf
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
[supervisord]
|
[supervisord]
|
||||||
nodaemon=true
|
nodaemon = true
|
||||||
user=%(ENV_USER)s
|
user = %(ENV_USER)s
|
||||||
logfile=/var/log/supervisor/supervisord.log
|
logfile = /var/log/supervisor/supervisord.log
|
||||||
pidfile=/var/run/supervisord.pid
|
pidfile = /var/run/supervisord.pid
|
||||||
|
|
||||||
[unix_http_server]
|
|
||||||
file=/var/run/supervisor.sock
|
|
||||||
|
|
||||||
[supervisorctl]
|
[supervisorctl]
|
||||||
serverurl=unix:///var/run/supervisor.sock
|
|
||||||
|
[inet_http_server]
|
||||||
|
port = 127.0.0.1:9001
|
||||||
|
|
||||||
[rpcinterface:supervisor]
|
[rpcinterface:supervisor]
|
||||||
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
[program:horizon]
|
[program:horizon]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name = %(program_name)s_%(process_num)s
|
||||||
command=php %(ENV_ROOT)s/artisan horizon
|
command = php %(ENV_ROOT)s/artisan horizon
|
||||||
user=%(ENV_USER)s
|
user = %(ENV_USER)s
|
||||||
autostart=true
|
autostart = true
|
||||||
autorestart=true
|
autorestart = true
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile = /dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes = 0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile = /dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes = 0
|
||||||
stopwaitsecs=3600
|
stopwaitsecs = 3600
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
files=/etc/supervisor/supervisord.conf
|
files = /etc/supervisord.conf
|
||||||
|
|||||||
14
docker/prod/deployment/supervisord.reverb.conf
Normal file
14
docker/prod/deployment/supervisord.reverb.conf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[program:reverb]
|
||||||
|
process_name = %(program_name)s_%(process_num)s
|
||||||
|
command = php %(ENV_ROOT)s/artisan reverb:start
|
||||||
|
user = %(ENV_USER)s
|
||||||
|
autostart = true
|
||||||
|
autorestart = true
|
||||||
|
stdout_logfile = /dev/stdout
|
||||||
|
stdout_logfile_maxbytes = 0
|
||||||
|
stderr_logfile = /dev/stderr
|
||||||
|
stderr_logfile_maxbytes = 0
|
||||||
|
minfds = 10000
|
||||||
|
|
||||||
|
[include]
|
||||||
|
files = /etc/supervisord.conf
|
||||||
@@ -1,26 +1,26 @@
|
|||||||
[program:scheduler]
|
[program:scheduler]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name = %(program_name)s_%(process_num)s
|
||||||
command=supercronic -overlapping /etc/supercronic/laravel
|
command = supercronic -overlapping /etc/supercronic/laravel
|
||||||
user=%(ENV_USER)s
|
user = %(ENV_USER)s
|
||||||
autostart=true
|
autostart = true
|
||||||
autorestart=true
|
autorestart = true
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile = /dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes = 0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile = /dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes = 0
|
||||||
|
|
||||||
[program:clear-scheduler-cache]
|
[program:clear-scheduler-cache]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name = %(program_name)s_%(process_num)s
|
||||||
command=php %(ENV_ROOT)s/artisan schedule:clear-cache
|
command = php %(ENV_ROOT)s/artisan schedule:clear-cache
|
||||||
user=%(ENV_USER)s
|
user = %(ENV_USER)s
|
||||||
autostart=true
|
autostart = true
|
||||||
autorestart=false
|
autorestart = false
|
||||||
startsecs=0
|
startsecs = 0
|
||||||
startretries=1
|
startretries = 1
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile = /dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes = 0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile = /dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes = 0
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
files=/etc/supervisor/supervisord.conf
|
files = /etc/supervisord.conf
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
logfile=/var/log/supervisor/supervisord.log
|
|
||||||
pidfile=/var/run/supervisord.pid
|
|
||||||
|
|
||||||
[program:octane]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=php %(ENV_ROOT)s/artisan octane:start --server=swoole --host=0.0.0.0 --port=8000
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=true
|
|
||||||
autorestart=true
|
|
||||||
environment=LARAVEL_OCTANE="1"
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
|
|
||||||
[program:horizon]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=php %(ENV_ROOT)s/artisan horizon
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=%(ENV_WITH_HORIZON)s
|
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=%(ENV_ROOT)s/horizon.log
|
|
||||||
stopwaitsecs=3600
|
|
||||||
|
|
||||||
[program:scheduler]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=supercronic -overlapping /etc/supercronic/laravel
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=%(ENV_WITH_SCHEDULER)s
|
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=%(ENV_ROOT)s/scheduler.log
|
|
||||||
|
|
||||||
[program:clear-scheduler-cache]
|
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
|
||||||
command=php %(ENV_ROOT)s/artisan schedule:clear-cache
|
|
||||||
user=%(ENV_USER)s
|
|
||||||
autostart=%(ENV_WITH_SCHEDULER)s
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=%(ENV_ROOT)s/scheduler.log
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
[program:worker]
|
[program:worker]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name = %(program_name)s_%(process_num)s
|
||||||
command=%(ENV_WORKER_COMMAND)s
|
command = %(ENV_WORKER_COMMAND)s
|
||||||
user=%(ENV_USER)s
|
user = %(ENV_USER)s
|
||||||
autostart=true
|
autostart = true
|
||||||
autorestart=true
|
autorestart = true
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile = /dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes = 0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile = /dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes = 0
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
files=/etc/supervisor/supervisord.conf
|
files = /etc/supervisord.conf
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
tinker() {
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
php artisan tinker
|
|
||||||
else
|
|
||||||
php artisan tinker --execute="\"dd($1);\""
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Commonly used aliases
|
|
||||||
alias ..="cd .."
|
|
||||||
alias ...="cd ../.."
|
|
||||||
alias art="php artisan"
|
|
||||||
Reference in New Issue
Block a user