mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-29 10:17:10 +01:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eca3af3da5 | ||
|
|
b141cfe449 | ||
|
|
3104ec0be9 | ||
|
|
acd778f815 | ||
|
|
0641860c3f | ||
|
|
f6564ffb14 | ||
|
|
d751217d9a | ||
|
|
9bd40b98df | ||
|
|
54f789d5a1 | ||
|
|
a6644abaa2 | ||
|
|
d42e333248 | ||
|
|
2e4ccb920b | ||
|
|
ebe353ca52 |
@@ -28,7 +28,7 @@ RUN npm install --production \
|
|||||||
&& npm run production \
|
&& npm run production \
|
||||||
&& rm -rf node_modules \
|
&& rm -rf node_modules \
|
||||||
&& mv /var/www/app/storage $BAK_STORAGE_PATH \
|
&& mv /var/www/app/storage $BAK_STORAGE_PATH \
|
||||||
&& mv /var/www/app/public $BAK_PUBLIC_PATH
|
&& mv /var/www/app/public $BAK_PUBLIC_PATH
|
||||||
|
|
||||||
# Prepare php image
|
# Prepare php image
|
||||||
FROM php:${PHP_VERSION}-fpm-alpine
|
FROM php:${PHP_VERSION}-fpm-alpine
|
||||||
@@ -66,12 +66,14 @@ RUN install-php-extensions \
|
|||||||
# Install chromium
|
# Install chromium
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
|
supervisor \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
git \
|
git \
|
||||||
chromium \
|
chromium \
|
||||||
ttf-freefont
|
ttf-freefont
|
||||||
|
|
||||||
COPY ./config/php/php.ini /usr/local/etc/php/conf.d/in-php.ini
|
COPY ./config/php/php.ini /usr/local/etc/php/conf.d/in-php.ini
|
||||||
|
COPY ./config/supervisor/supervisord.conf /
|
||||||
|
|
||||||
## Separate user
|
## Separate user
|
||||||
ARG UID=1500
|
ARG UID=1500
|
||||||
@@ -86,7 +88,9 @@ RUN addgroup --gid=$UID -S "$INVOICENINJA_USER" \
|
|||||||
--no-create-home \
|
--no-create-home \
|
||||||
"$INVOICENINJA_USER" \
|
"$INVOICENINJA_USER" \
|
||||||
&& addgroup "$INVOICENINJA_USER" www-data \
|
&& addgroup "$INVOICENINJA_USER" www-data \
|
||||||
&& chown -R "$INVOICENINJA_USER":"$INVOICENINJA_USER" /var/www/app
|
&& mkdir /var/log/supervisord /var/run/supervisord \
|
||||||
|
&& chown -R "$INVOICENINJA_USER":"$INVOICENINJA_USER" /var/www/app \
|
||||||
|
&& chown $INVOICENINJA_USER:www-data /var/log/supervisord /var/run/supervisord
|
||||||
|
|
||||||
USER $UID
|
USER $UID
|
||||||
|
|
||||||
@@ -98,4 +102,4 @@ ENV LOG errorlog
|
|||||||
ENV SNAPPDF_EXECUTABLE_PATH /usr/bin/chromium-browser
|
ENV SNAPPDF_EXECUTABLE_PATH /usr/bin/chromium-browser
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint"]
|
ENTRYPOINT ["docker-entrypoint"]
|
||||||
CMD ["php-fpm"]
|
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||||
36
config/supervisor/supervisord.conf
Normal file
36
config/supervisor/supervisord.conf
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
[supervisord]
|
||||||
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
|
nodaemon=true
|
||||||
|
user=invoiceninja
|
||||||
|
pidfile=/var/run/supervisord/supervisord.pid
|
||||||
|
logfile=/dev/null ; nodaemon will cause logs to go to stdout
|
||||||
|
logfile_maxbytes=0
|
||||||
|
loglevel=error
|
||||||
|
|
||||||
|
[program:php-fpm]
|
||||||
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=php-fpm
|
||||||
|
|
||||||
|
[program:scheduler]
|
||||||
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=php artisan schedule:work
|
||||||
|
|
||||||
|
[program:queue-worker]
|
||||||
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
redirect_stderr=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
numprocs=2
|
||||||
|
command=php artisan queue:work --sleep=3 --tries=1 --memory=1024 --timeout=3600 --daemon
|
||||||
@@ -25,4 +25,5 @@ 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
|
||||||
command=php artisan queue:listen
|
numprocs=2
|
||||||
|
command=php artisan queue:work --sleep=3 --tries=1 --memory=1024 --timeout=3600 --daemon
|
||||||
Reference in New Issue
Block a user