mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-06 22:47:26 +01:00
Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a89e145bf9 | ||
|
|
85d46e8968 | ||
|
|
0fb5fa73e0 | ||
|
|
de3a2e4278 | ||
|
|
bb514e8d06 | ||
|
|
2034c6ebff | ||
|
|
65e36505a3 | ||
|
|
03c1e32123 | ||
|
|
3612c87323 | ||
|
|
4e9731a23e | ||
|
|
dea442c442 | ||
|
|
a24c1b98a3 | ||
|
|
1596478724 | ||
|
|
a240fd2977 | ||
|
|
7c1ef67755 | ||
|
|
bfc1d7add8 | ||
|
|
111f5a7e4e | ||
|
|
330f3e1c0e | ||
|
|
baeb925d87 | ||
|
|
079a05bbd8 | ||
|
|
8e995aa2ef | ||
|
|
dee4d0f27d | ||
|
|
60e5a68e01 | ||
|
|
67ad43d05d | ||
|
|
35beefba60 | ||
|
|
d1309cc86f | ||
|
|
a1d9220506 | ||
|
|
386359a346 | ||
|
|
b503418904 | ||
|
|
450eaf16e3 | ||
|
|
1f65c9f7f6 | ||
|
|
c02bf7bd03 | ||
|
|
4111fa87c9 | ||
|
|
0d5a7671ba | ||
|
|
7ea6e7c48e | ||
|
|
27e1788e91 | ||
|
|
d24a69ec39 | ||
|
|
8384175465 | ||
|
|
f8c442ec5f | ||
|
|
05f89f064e | ||
|
|
902745ec5a | ||
|
|
4efba38ce5 | ||
|
|
a184cf2844 | ||
|
|
94e8be57e5 | ||
|
|
385a434833 | ||
|
|
9ddeda4c32 | ||
|
|
805e526fc9 | ||
|
|
cdc35aff2f | ||
|
|
1de16ab390 | ||
|
|
b9ab50800d | ||
|
|
d2d03b9b18 | ||
|
|
ea0f3fa981 | ||
|
|
1d9a8681b2 | ||
|
|
f98b3915bd | ||
|
|
8762276c6f | ||
|
|
afcd9389ed | ||
|
|
591c799864 | ||
|
|
4c9c5ddd95 |
@@ -1,4 +1,4 @@
|
|||||||
ARG PHP_VERSION=7.3
|
ARG PHP_VERSION=7.4
|
||||||
|
|
||||||
# Get Invoice Ninja
|
# Get Invoice Ninja
|
||||||
FROM alpine:latest as base
|
FROM alpine:latest as base
|
||||||
@@ -7,6 +7,7 @@ ARG INVOICENINJA_VERSION
|
|||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
curl \
|
curl \
|
||||||
|
mysql-client \
|
||||||
libarchive-tools; \
|
libarchive-tools; \
|
||||||
mkdir -p /var/www/app
|
mkdir -p /var/www/app
|
||||||
|
|
||||||
@@ -17,7 +18,6 @@ RUN curl -o /tmp/ninja.tar.gz -LJ0 https://github.com/invoiceninja/invoiceninja/
|
|||||||
&& cp -R /var/www/app/public /var/www/app/docker-backup-public \
|
&& cp -R /var/www/app/public /var/www/app/docker-backup-public \
|
||||||
&& mkdir -p /var/www/app/public/logo /var/www/app/storage \
|
&& mkdir -p /var/www/app/public/logo /var/www/app/storage \
|
||||||
&& cp /var/www/app/.env.example /var/www/app/.env \
|
&& cp /var/www/app/.env.example /var/www/app/.env \
|
||||||
&& cp /var/www/app/.env.dusk.example /var/www/app/.env.dusk.local \
|
|
||||||
&& rm -rf /var/www/app/docs /var/www/app/tests
|
&& rm -rf /var/www/app/docs /var/www/app/tests
|
||||||
|
|
||||||
# Install nodejs packages
|
# Install nodejs packages
|
||||||
@@ -45,19 +45,22 @@ RUN set -eux; \
|
|||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
nodejs \
|
nodejs \
|
||||||
npm \
|
npm \
|
||||||
|
mysql-client \
|
||||||
freetype-dev \
|
freetype-dev \
|
||||||
gmp-dev \
|
gmp-dev \
|
||||||
libjpeg-turbo-dev \
|
libjpeg-turbo-dev \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libzip-dev; \
|
libzip-dev \
|
||||||
docker-php-ext-configure zip --with-libzip; \
|
oniguruma-dev \
|
||||||
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/; \
|
git \
|
||||||
|
zip; \
|
||||||
|
docker-php-ext-configure gd --with-freetype --with-jpeg; \
|
||||||
docker-php-ext-install -j$(nproc) \
|
docker-php-ext-install -j$(nproc) \
|
||||||
bcmath \
|
bcmath \
|
||||||
exif \
|
exif \
|
||||||
gd \
|
gd \
|
||||||
gmp \
|
gmp \
|
||||||
mbstring \
|
# mbstring \
|
||||||
mysqli \
|
mysqli \
|
||||||
opcache \
|
opcache \
|
||||||
pdo \
|
pdo \
|
||||||
@@ -67,9 +70,16 @@ RUN set -eux; \
|
|||||||
COPY ./config/php/php.ini /usr/local/etc/php/php.ini
|
COPY ./config/php/php.ini /usr/local/etc/php/php.ini
|
||||||
COPY ./config/php/php-cli.ini /usr/local/etc/php/php-cli.ini
|
COPY ./config/php/php-cli.ini /usr/local/etc/php/php-cli.ini
|
||||||
|
|
||||||
## Set up the cronjob
|
RUN apk add --no-cache \
|
||||||
RUN echo "* * * * * run-parts /etc/periodic/1min" >> /etc/crontabs/root
|
chromium \
|
||||||
COPY ./config/cron/cronjob_v5.sh /etc/periodic/1min/invoiceninja_cronjob
|
nss \
|
||||||
|
freetype \
|
||||||
|
freetype-dev \
|
||||||
|
harfbuzz \
|
||||||
|
ca-certificates \
|
||||||
|
ttf-freefont \
|
||||||
|
nodejs \
|
||||||
|
yarn
|
||||||
|
|
||||||
## Separate user
|
## Separate user
|
||||||
ENV INVOICENINJA_USER=invoiceninja
|
ENV INVOICENINJA_USER=invoiceninja
|
||||||
@@ -86,16 +96,22 @@ RUN addgroup -S "$INVOICENINJA_USER" && \
|
|||||||
chown -R "$INVOICENINJA_USER":"$INVOICENINJA_USER" /var/www/app
|
chown -R "$INVOICENINJA_USER":"$INVOICENINJA_USER" /var/www/app
|
||||||
|
|
||||||
# Install Composer
|
# Install Composer
|
||||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer; \
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer;
|
||||||
composer global require hirak/prestissimo;
|
|
||||||
|
## Set up the cronjob and run cron daemon
|
||||||
|
RUN echo "* * * * * run-parts /etc/periodic/1min" >> /etc/crontabs/root
|
||||||
|
COPY ./config/cron/cronjob_v5.sh /etc/periodic/1min/invoiceninja_cronjob
|
||||||
|
RUN chown $INVOICENINJA_USER /etc/periodic/1min/invoiceninja_cronjob && \
|
||||||
|
crond -l 2 -b
|
||||||
|
|
||||||
USER $INVOICENINJA_USER
|
USER $INVOICENINJA_USER
|
||||||
|
|
||||||
RUN composer install --no-dev --no-suggest --no-progress
|
RUN /usr/local/bin/composer install --no-dev --no-suggest --no-progress --quiet
|
||||||
|
|
||||||
# Override the environment settings from projects .env file
|
# Override the environment settings from projects .env file
|
||||||
ENV APP_ENV production
|
ENV APP_ENV production
|
||||||
ENV LOG errorlog
|
ENV LOG errorlog
|
||||||
|
ENV SNAPPDF_EXECUTABLE_PATH /usr/bin/chromium-browser
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint"]
|
ENTRYPOINT ["docker-entrypoint"]
|
||||||
CMD ["php-fpm"]
|
CMD ["php-fpm"]
|
||||||
|
|||||||
0
config/cron/cronjob_v5.sh
Normal file → Executable file
0
config/cron/cronjob_v5.sh
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
server_name in.localhost;
|
server_name _ in.localhost;
|
||||||
|
|
||||||
root /var/www/app/public/;
|
root /var/www/app/public/;
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|||||||
@@ -30,11 +30,18 @@ services:
|
|||||||
app:
|
app:
|
||||||
image: invoiceninja/invoiceninja:5
|
image: invoiceninja/invoiceninja:5
|
||||||
restart: always
|
restart: always
|
||||||
|
cap_add:
|
||||||
|
- SYS_ADMIN
|
||||||
environment:
|
environment:
|
||||||
- APP_URL=https://localhost
|
- APP_URL=https://localhost
|
||||||
- APP_KEY=<INSERT THE GENERATED APPLICATION KEY HERE>
|
- APP_KEY=<INSERT THE GENERATED APPLICATION KEY HERE>
|
||||||
- MULTI_DB_ENABLED=false
|
- MULTI_DB_ENABLED=false
|
||||||
- DB_HOST1=db
|
- DB_HOST1=db
|
||||||
|
- DB_USERNAME1=ninja
|
||||||
|
- DB_PASSWORD1=ninja
|
||||||
|
- DB_DATABASE1=ninja
|
||||||
|
- PHANTOMJS_PDF_GENERATION=false
|
||||||
|
- SNAPPDF_EXECUTABLE_PATH="/usr/bin/chromium-browser"
|
||||||
volumes:
|
volumes:
|
||||||
# Configure your mounted directories, make sure the folder 'public' and 'storage'
|
# Configure your mounted directories, make sure the folder 'public' and 'storage'
|
||||||
# exist, before mounting them
|
# exist, before mounting them
|
||||||
@@ -55,7 +62,7 @@ services:
|
|||||||
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
|
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
|
||||||
- MYSQL_USER=ninja
|
- MYSQL_USER=ninja
|
||||||
- MYSQL_PASSWORD=ninja
|
- MYSQL_PASSWORD=ninja
|
||||||
- MYSQL_DATABASE=db-ninja-01
|
- MYSQL_DATABASE=ninja
|
||||||
volumes:
|
volumes:
|
||||||
- mysql-data:/var/lib/mysql:rw
|
- mysql-data:/var/lib/mysql:rw
|
||||||
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
|
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
|
||||||
@@ -91,4 +98,4 @@ volumes:
|
|||||||
# logo:
|
# logo:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
invoiceninja:
|
invoiceninja:
|
||||||
|
|||||||
@@ -90,7 +90,11 @@ file_env 'APP_KEY'
|
|||||||
file_env 'API_SECRET'
|
file_env 'API_SECRET'
|
||||||
file_env 'CLOUDFLARE_API_KEY'
|
file_env 'CLOUDFLARE_API_KEY'
|
||||||
file_env 'DB_USERNAME'
|
file_env 'DB_USERNAME'
|
||||||
|
file_env 'DB_USERNAME1'
|
||||||
|
file_env 'DB_USERNAME2'
|
||||||
file_env 'DB_PASSWORD'
|
file_env 'DB_PASSWORD'
|
||||||
|
file_env 'DB_PASSWORD1'
|
||||||
|
file_env 'DB_PASSWORD2'
|
||||||
file_env 'MAIL_USERNAME'
|
file_env 'MAIL_USERNAME'
|
||||||
file_env 'MAIL_PASSWORD'
|
file_env 'MAIL_PASSWORD'
|
||||||
file_env 'MAILGUN_SECRET'
|
file_env 'MAILGUN_SECRET'
|
||||||
@@ -101,7 +105,4 @@ file_env 'S3_SECRET'
|
|||||||
php artisan config:cache
|
php artisan config:cache
|
||||||
php artisan optimize
|
php artisan optimize
|
||||||
|
|
||||||
# Start the cron daemon in background
|
|
||||||
crond -l 2 -b
|
|
||||||
|
|
||||||
exec docker-php-entrypoint "$@"
|
exec docker-php-entrypoint "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user