实现后台及前台通过API访问UV埋点,所有代码全部保存
This commit is contained in:
@@ -7,8 +7,12 @@ WORKDIR /var/www/html
|
||||
# 拷贝本地的 sources.list 文件以加速 apt-get
|
||||
COPY ./sources.list /etc/apt/sources.list
|
||||
|
||||
# 复制Supervisor配置
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# 安装系统依赖
|
||||
RUN apt-get update && apt-get install -y \
|
||||
supervisor \
|
||||
git \
|
||||
curl \
|
||||
vim \
|
||||
@@ -73,4 +77,5 @@ RUN echo "zend_extension=xdebug.so" > /usr/local/etc/php/conf.d/xdebug.ini
|
||||
# 暴露端口
|
||||
EXPOSE 9000 9003
|
||||
|
||||
CMD ["php-fpm"]
|
||||
# 启动Supervisor
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||
29
docker/php/supervisord.conf
Normal file
29
docker/php/supervisord.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/var/log/supervisord.log
|
||||
logfile_maxbytes=50MB
|
||||
logfile_backups=10
|
||||
loglevel=info
|
||||
pidfile=/var/run/supervisord.pid
|
||||
|
||||
[program:php-fpm]
|
||||
command=php-fpm
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=3
|
||||
startsecs=1
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
|
||||
[program:think-cron]
|
||||
command=php /var/www/html/think cron:schedule
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=5
|
||||
startsecs=2
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
Reference in New Issue
Block a user