mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
docker
This commit is contained in:
parent
962c57ec2c
commit
211c70d654
@ -94,9 +94,7 @@
|
|||||||
"visiosoft/base-theme": "^1.0",
|
"visiosoft/base-theme": "^1.0",
|
||||||
"visiosoft/advs-module": "^1.0",
|
"visiosoft/advs-module": "^1.0",
|
||||||
"visiosoft/json-field_type": "^1.0",
|
"visiosoft/json-field_type": "^1.0",
|
||||||
"visiosoft/language_switcher-plugin": "^1.0",
|
"visiosoft/language_switcher-plugin": "^1.0"
|
||||||
"predis/predis": "^2.0",
|
|
||||||
"laravel/horizon": "^5.9"
|
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
"anomaly/streams-platform": "*"
|
"anomaly/streams-platform": "*"
|
||||||
@ -152,6 +150,6 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"bin-dir": "bin",
|
"bin-dir": "bin",
|
||||||
"preferred-install": "dist",
|
"preferred-install": "dist",
|
||||||
"optimize-autoloader": true
|
"optimize-autoloader": true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,18 +13,5 @@ stdout_logfile_maxbytes=0
|
|||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
[program:cron]
|
[include]
|
||||||
command=/usr/sbin/cron -f -l 8
|
files=/var/www/html/supervisord/*.conf
|
||||||
autostart=true
|
|
||||||
stdout_logfile=/var/log/cron.out.log
|
|
||||||
stderr_logfile=/var/log/cron.err.log
|
|
||||||
|
|
||||||
[program:horizon]
|
|
||||||
process_name=%(program_name)s
|
|
||||||
command=php /var/www/html/artisan horizon
|
|
||||||
autostart=true
|
|
||||||
autorestart=true
|
|
||||||
user=sail
|
|
||||||
redirect_stderr=true
|
|
||||||
stdout_logfile=/var/www/html/storage/logs/horizon.log
|
|
||||||
stopwaitsecs=3600
|
|
||||||
@ -43,9 +43,11 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y yarn \
|
&& apt-get install -y yarn \
|
||||||
&& apt-get install -y mysql-client \
|
&& apt-get install -y mysql-client \
|
||||||
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
|
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y cron \
|
||||||
&& apt-get -y autoremove \
|
&& apt-get -y autoremove \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||||
|
|
||||||
RUN update-alternatives --set php /usr/bin/php8.0
|
RUN update-alternatives --set php /usr/bin/php8.0
|
||||||
|
|
||||||
@ -59,6 +61,11 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|||||||
COPY php.ini /etc/php/8.0/cli/conf.d/99-sail.ini
|
COPY php.ini /etc/php/8.0/cli/conf.d/99-sail.ini
|
||||||
RUN chmod +x /usr/local/bin/start-container
|
RUN chmod +x /usr/local/bin/start-container
|
||||||
|
|
||||||
|
COPY scheduler /etc/cron.d/scheduler
|
||||||
|
RUN chmod +x /etc/cron.d/scheduler
|
||||||
|
|
||||||
|
RUN crontab /etc/cron.d/scheduler
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
ENTRYPOINT ["start-container"]
|
ENTRYPOINT ["start-container"]
|
||||||
|
|||||||
@ -12,3 +12,6 @@ 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]
|
||||||
|
files=/var/www/html/supervisord/*.conf
|
||||||
@ -58,6 +58,11 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|||||||
COPY php.ini /etc/php/8.1/cli/conf.d/99-sail.ini
|
COPY php.ini /etc/php/8.1/cli/conf.d/99-sail.ini
|
||||||
RUN chmod +x /usr/local/bin/start-container
|
RUN chmod +x /usr/local/bin/start-container
|
||||||
|
|
||||||
|
COPY scheduler /etc/cron.d/scheduler
|
||||||
|
RUN chmod +x /etc/cron.d/scheduler
|
||||||
|
|
||||||
|
RUN crontab /etc/cron.d/scheduler
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
ENTRYPOINT ["start-container"]
|
ENTRYPOINT ["start-container"]
|
||||||
|
|||||||
1
docker/8.1/scheduler
Normal file
1
docker/8.1/scheduler
Normal file
@ -0,0 +1 @@
|
|||||||
|
* * * * * root cd /var/www/html && php artisan schedule:run >> /dev/null 2>&1
|
||||||
@ -12,3 +12,6 @@ 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]
|
||||||
|
files=/var/www/html/supervisord/*.conf
|
||||||
5
supervisord/cron.conf
Normal file
5
supervisord/cron.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[program:cron]
|
||||||
|
command=/usr/sbin/cron -f -l 8
|
||||||
|
autostart=true
|
||||||
|
stdout_logfile=/var/log/cron.out.log
|
||||||
|
stderr_logfile=/var/log/cron.err.log
|
||||||
@ -1,9 +0,0 @@
|
|||||||
[program:horizon]
|
|
||||||
process_name=%(program_name)s
|
|
||||||
command=php /var/www/html/artisan horizon
|
|
||||||
autostart=true
|
|
||||||
autorestart=true
|
|
||||||
user=sail
|
|
||||||
redirect_stderr=true
|
|
||||||
stdout_logfile=/var/www/html/storage/logs/horizon.log
|
|
||||||
stopwaitsecs=3600
|
|
||||||
Loading…
Reference in New Issue
Block a user