Compare commits

..

54 Commits
3.3.3 ... 4.3.1

Author SHA1 Message Date
Sam
41544ec1e0 4.3.1 2018-04-09 11:53:45 +02:00
Sam
f3b5a62d36 4.3.0 2018-04-08 10:13:25 +02:00
Sam
69d2f54b03 php 7.2 2018-04-05 14:29:10 +02:00
Sam
5a1c1c16d7 fix clean composer 2018-04-04 16:57:39 +02:00
Sam
3ade74efc9 fix Dockerfile 2018-04-04 12:46:21 +02:00
Sam
dc00f6a604 rm composer after build 2018-04-04 12:30:58 +02:00
Sam
3ef75b29ff 4.2.2 2018-03-12 10:05:06 +01:00
Sam
e6df981f06 4.2.1 2018-03-05 09:44:34 +01:00
Aurélien Lavorel
27bdb5d95b [add] mysql performance improvement 2018-02-28 17:46:22 +01:00
Sam
206fe5db2d 4.2.0 2018-02-22 10:03:01 +01:00
Samuel Laulhau
4e5022fcc4 remove useless and/or wrong default settings 2018-02-20 15:01:24 +01:00
Sam
ded7e32051 4.1.5 2018-02-07 22:10:59 +01:00
Sam
d2ae9b365b 4.1.4 2018-01-25 22:02:05 +01:00
Sam
612645fad2 4.1.3 2018-01-19 15:56:49 +01:00
Sam
192f6d7648 4.1.2 2018-01-16 21:45:53 +01:00
Sam
083fe9648e 4.1.1 2018-01-16 21:45:26 +01:00
Sam
6ad5e6ec48 fix readme for image base 2018-01-14 22:53:25 +01:00
Sam
13487557e6 docker-compose for production 2018-01-14 22:44:20 +01:00
Sam
16f77b069e 4.1.0 2018-01-09 19:05:50 +01:00
Sam
58c4eb66d4 4.0.1 2017-12-14 22:28:01 +01:00
Sam
d044303647 4.0.0 2017-12-12 10:42:04 +01:00
Sam
09b5b84750 3.9.2 2017-11-20 10:36:53 +01:00
Sam
2932f92f4c 3.9.1 2017-11-14 15:24:03 +01:00
Sam
3ad282ac29 re3.9.0 2017-11-09 14:01:23 +01:00
Sam
507451d7ca 3.9.0 2017-11-09 13:53:53 +01:00
Sam
2d563e4b73 3.8.1 2017-10-23 14:39:16 +02:00
Sam
991b22e121 3.8.0 2017-10-15 15:01:13 +02:00
jelle
c4e8f3ea0b Mount MySQL volume to make data persistent 2017-10-15 14:53:13 +02:00
Samuel Laulhau
ee272cd52f add cipher/key 2017-10-15 14:51:01 +02:00
Sam
a60567ae16 3.7.2 2017-10-02 10:23:24 +02:00
Sam
d81542e536 3.7.1 2017-09-18 09:48:28 +02:00
Sam
19333d150a 3.7.0 2017-09-11 08:27:02 +02:00
Sam
ad1c976a31 3.6.1 2017-08-17 10:39:37 +02:00
Sam
bd7153a0b7 3.6.0 2017-08-08 11:51:37 +02:00
Sam
c1fde99ad4 3.5.1 2017-07-23 10:35:03 +02:00
Sam
c7d901f8c3 3.5.0 2017-07-23 10:34:47 +02:00
arubacao
e432564e48 Revert "Update php:7.0-fpm to php:7.1-fpm"
This reverts commit 17759c3df7.
2017-07-20 09:14:02 +02:00
arubacao
2d42e33da0 Revert "remove mcrypt"
This reverts commit ce4cf2118b.
2017-07-20 09:14:02 +02:00
arubacao
00ae03ce24 Revert "remove rijndael-128 as default cipher"
This reverts commit e0f46d2034.
2017-07-20 09:14:02 +02:00
arubacao
5f4e58ba77 Revert "use wildcard for nginx.conf"
This reverts commit 5d2760a47a.
2017-07-20 09:14:02 +02:00
arubacao
b822d9d53a Revert "add APP_KEY for the example"
This reverts commit c90e0dd42b.
2017-07-20 09:14:02 +02:00
arubacao
8a935f042e Revert "repeat steps for alpine"
This reverts commit ddb96915cf.
2017-07-20 09:14:02 +02:00
arubacao
ddb96915cf repeat steps for alpine 2017-07-13 17:58:50 +02:00
arubacao
c90e0dd42b add APP_KEY for the example 2017-07-13 17:58:50 +02:00
arubacao
5d2760a47a use wildcard for nginx.conf 2017-07-13 17:58:50 +02:00
arubacao
e0f46d2034 remove rijndael-128 as default cipher 2017-07-13 17:58:50 +02:00
arubacao
ce4cf2118b remove mcrypt 2017-07-13 17:58:50 +02:00
arubacao
17759c3df7 Update php:7.0-fpm to php:7.1-fpm 2017-07-13 17:58:50 +02:00
Sam
c97fd64020 3.4.2 2017-06-30 14:45:02 +02:00
Sam
467960061b 3.4.1 2017-06-22 20:48:57 +02:00
Sam
2dfa7e1edd 3.4.0 2017-06-18 12:53:09 +02:00
Sam
475b3e7121 notice on phantomjs/alpine 2017-06-18 12:52:36 +02:00
Sam
7c40a5a813 alpine change phantomjs bin path 2017-06-11 16:55:34 +02:00
Sam
b92c8d928e fix phantomjs install in alpine 2017-06-11 14:25:18 +02:00
7 changed files with 89 additions and 87 deletions

View File

@@ -1,4 +1,4 @@
FROM php:7.0-fpm
FROM php:7.2-fpm
MAINTAINER Samuel Laulhau <sam@lalop.co>
@@ -8,14 +8,14 @@ MAINTAINER Samuel Laulhau <sam@lalop.co>
ENV PHANTOMJS phantomjs-2.1.1-linux-x86_64
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libmcrypt-dev zlib1g-dev git libgmp-dev \
libfreetype6-dev libjpeg62-turbo-dev libpng12-dev \
zlib1g-dev git libgmp-dev \
libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
build-essential chrpath libssl-dev libxft-dev \
libfreetype6 libfontconfig1 libfontconfig1-dev \
&& ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure gmp \
&& docker-php-ext-install iconv mcrypt mbstring pdo pdo_mysql zip gd gmp opcache \
&& docker-php-ext-install iconv mbstring pdo pdo_mysql zip gd gmp opcache \
&& curl -o ${PHANTOMJS}.tar.bz2 -SL https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOMJS}.tar.bz2 \
&& tar xvjf ${PHANTOMJS}.tar.bz2 \
&& rm ${PHANTOMJS}.tar.bz2 \
@@ -44,7 +44,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
# DOWNLOAD AND INSTALL INVOICE NINJA
#####
ENV INVOICENINJA_VERSION 3.3.3
ENV INVOICENINJA_VERSION 4.3.1
RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja/archive/v${INVOICENINJA_VERSION}.tar.gz \
&& tar -xzf invoiceninja.tar.gz -C /var/www/ \
@@ -55,20 +55,14 @@ RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja
&& chown -R www-data:www-data /var/www/app/bootstrap/cache \
&& mv /var/www/app/storage /var/www/app/docker-backup-storage \
&& mv /var/www/app/public /var/www/app/docker-backup-public \
&& rm -rf /var/www/app/docs /var/www/app/tests
&& rm -rf /var/www/app/docs /var/www/app/tests \
&& rm /usr/local/bin/composer
######
# DEFAULT ENV
######
ENV DB_HOST mysql
ENV DB_DATABASE ninja
ENV DB_USERNAME ninja
ENV DB_PASSWORD ninja
ENV APP_KEY SomeRandomString
ENV LOG errorlog
ENV APP_DEBUG 0
ENV APP_CIPHER rijndael-128
ENV SELF_UPDATER_SOURCE ''
ENV PHANTOMJS_BIN_PATH /usr/local/bin/phantomjs

View File

@@ -1,13 +1,9 @@
DockerFile for invoice ninja (https://www.invoiceninja.com/)
This image is based on `php:7` official version.
The easiest way to test Invoice Ninja with docker is by copying the example directory, run `docker-compose up` and visit http://localhost:8000/ .
This image is based on `php:7.0-fpm` official version.
To make your data persistent, you have to mount `/var/www/app/public/logo` and `/var/www/app/storage`.
All the supported environment variable can be found here https://github.com/invoiceninja/invoiceninja/blob/master/.env.example
### Usage
@@ -32,3 +28,13 @@ docker run -d
A list of environment variables can be found [here](https://github.com/invoiceninja/invoiceninja/blob/master/.env.example)
### With docker-compose
A pretty ready to use docker-compose configuration can be found into [`./docker-compose`](https://github.com/invoiceninja/dockerfiles/tree/master/docker-compose).
Rename `.env.example` into `.env` and change the environment's variable as needed.
The file assume that all your persistent data is mounted from `/srv/invoiceninja/`.
Once started the application should be accessible at http://localhost:8000/
### Know issue
Phantomjs doesn't work on linux alpine https://github.com/ariya/phantomjs/issues/14186

View File

@@ -1,4 +1,4 @@
FROM php:7.0-fpm-alpine
FROM php:7.2-fpm-alpine
MAINTAINER Samuel Laulhau <sam@lalop.co>
@@ -6,30 +6,20 @@ MAINTAINER Samuel Laulhau <sam@lalop.co>
# SYSTEM REQUIREMENT
#####
ENV PHANTOMJS phantomjs-2.1.1-linux-x86_64
RUN apk update
RUN apk add libmcrypt-dev
# RUN apk add zlib1g-dev
RUN apk add git
RUN apk add gmp-dev
RUN apk add freetype-dev
RUN apk add libjpeg-turbo-dev
RUN apk add libpng-dev
RUN apk add coreutils
RUN apk add chrpath
# RUN apk add libssl-dev
# RUN apk add libxft-dev \
# libfreetype6 libfontconfig1 libfontconfig1-dev \
RUN apk update \
&& apk add --no-cache git gmp-dev freetype-dev libjpeg-turbo-dev \
coreutils chrpath fontconfig libpng-dev
RUN ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure gmp \
&& docker-php-ext-install iconv mcrypt mbstring pdo pdo_mysql zip gd gmp opcache \
&& curl -o ${PHANTOMJS}.tar.bz2 -SL https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOMJS}.tar.bz2 \
&& tar xvjf ${PHANTOMJS}.tar.bz2 \
&& rm ${PHANTOMJS}.tar.bz2 \
&& mv ${PHANTOMJS} /usr/local/share \
&& ln -sf /usr/local/share/${PHANTOMJS}/bin/phantomjs /usr/local/bin \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install iconv mbstring pdo pdo_mysql zip gd gmp opcache \
&& echo "php_admin_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED">>/usr/local/etc/php-fpm.d/www.conf
RUN cd /usr/share \
&& curl -L https://github.com/Overbryd/docker-phantomjs-alpine/releases/download/2.11/phantomjs-alpine-x86_64.tar.bz2 | tar xj \
&& ln -s /usr/share/phantomjs/phantomjs /usr/local/bin/phantomjs
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
@@ -52,7 +42,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
# DOWNLOAD AND INSTALL INVOICE NINJA
#####
ENV INVOICENINJA_VERSION 3.3.3
ENV INVOICENINJA_VERSION 4.3.1
RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja/archive/v${INVOICENINJA_VERSION}.tar.gz \
&& tar -xzf invoiceninja.tar.gz -C /var/www/ \
@@ -63,8 +53,8 @@ RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja
&& chown -R www-data:www-data /var/www/app/bootstrap/cache \
&& mv /var/www/app/storage /var/www/app/docker-backup-storage \
&& mv /var/www/app/public /var/www/app/docker-backup-public \
&& rm -rf /var/www/app/docs /var/www/app/tests
&& rm -rf /var/www/app/docs /var/www/app/tests \
&& rm /usr/local/bin/composer
######
# DEFAULT ENV

View File

@@ -1,7 +1,10 @@
MYSQL_DATABASE=ninja
MYSQL_ROOT_PASSWORD=pwd
APP_DEBUG=1
APP_DEBUG=0
APP_URL=http://localhost:8000
APP_KEY=SomeRandomStringSomeRandomString
APP_CIPHER=AES-256-CBC
DB_USERNAME=root
DB_PASSWORD=pwd
DB_HOST=mysql

View File

@@ -0,0 +1,52 @@
version: "2"
services:
db:
image: mysql
env_file: .env
restart: always
volumes:
- data-volume:/var/lib/mysql
app:
image: invoiceninja/invoiceninja
links:
- db:mysql
env_file: .env
restart: always
volumes:
- ./srv/invoiceninja/storage:/var/www/app/storage:rw
- ./srv/invoiceninja/logo:/var/www/app/public/logo:rw
web:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
links:
- app
volumes_from:
- app
ports:
- 8000:80
cron:
image: invoiceninja/invoiceninja
links:
- db:mysql
env_file: .env
volumes_from:
- app
entrypoint: |
bash -c 'bash -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM
sleep 300s
while /bin/true; do
./artisan ninja:send-invoices
./artisan ninja:send-reminders
sleep 1h
done
EOF'
volumes:
data-volume:

View File

@@ -1,43 +0,0 @@
version: "2"
services:
db:
image: mysql
environment:
MYSQL_DATABASE: ninja
MYSQL_ROOT_PASSWORD: pwd
app:
image: invoiceninja/invoiceninja
links:
- db:mysql
env_file: .env
web:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
links:
- app
volumes_from:
- app
ports:
- 8000:80
# cron:
# image: invoiceninja/invoiceninja
# links:
# - db:mysql
# env_file: .env
# volumes_from:
# - app
# entrypoint: |
# bash -c 'bash -s <<EOF
# trap "break;exit" SIGHUP SIGINT SIGTERM
# sleep 300s
# while /bin/true; do
# /usr/local/bin/php /var/www/app/artisan ninja:send-invoices
# /usr/local/bin/php /var/www/app/artisan ninja:send-reminders
# sleep 1d
# done
# EOF'