mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-06 14:37:26 +01:00
Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ded7e32051 | ||
|
|
d2ae9b365b | ||
|
|
612645fad2 | ||
|
|
192f6d7648 | ||
|
|
083fe9648e | ||
|
|
6ad5e6ec48 | ||
|
|
13487557e6 | ||
|
|
16f77b069e | ||
|
|
58c4eb66d4 | ||
|
|
d044303647 | ||
|
|
09b5b84750 | ||
|
|
2932f92f4c | ||
|
|
3ad282ac29 | ||
|
|
507451d7ca | ||
|
|
2d563e4b73 | ||
|
|
991b22e121 | ||
|
|
c4e8f3ea0b | ||
|
|
ee272cd52f | ||
|
|
a60567ae16 | ||
|
|
d81542e536 | ||
|
|
19333d150a | ||
|
|
ad1c976a31 | ||
|
|
bd7153a0b7 | ||
|
|
c1fde99ad4 | ||
|
|
c7d901f8c3 | ||
|
|
e432564e48 | ||
|
|
2d42e33da0 | ||
|
|
00ae03ce24 | ||
|
|
5f4e58ba77 | ||
|
|
b822d9d53a | ||
|
|
8a935f042e | ||
|
|
ddb96915cf | ||
|
|
c90e0dd42b | ||
|
|
5d2760a47a | ||
|
|
e0f46d2034 | ||
|
|
ce4cf2118b | ||
|
|
17759c3df7 | ||
|
|
c97fd64020 | ||
|
|
467960061b | ||
|
|
2dfa7e1edd | ||
|
|
475b3e7121 | ||
|
|
7c40a5a813 | ||
|
|
b92c8d928e | ||
|
|
0ed2a1cf4c |
@@ -44,7 +44,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
|
|||||||
# DOWNLOAD AND INSTALL INVOICE NINJA
|
# DOWNLOAD AND INSTALL INVOICE NINJA
|
||||||
#####
|
#####
|
||||||
|
|
||||||
ENV INVOICENINJA_VERSION 3.3.1
|
ENV INVOICENINJA_VERSION 4.1.5
|
||||||
|
|
||||||
RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja/archive/v${INVOICENINJA_VERSION}.tar.gz \
|
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/ \
|
&& tar -xzf invoiceninja.tar.gz -C /var/www/ \
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -1,13 +1,9 @@
|
|||||||
DockerFile for invoice ninja (https://www.invoiceninja.com/)
|
DockerFile for invoice ninja (https://www.invoiceninja.com/)
|
||||||
|
|
||||||
This image is based on `php:7` official version.
|
This image is based on `php:7.0-fpm` 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/ .
|
|
||||||
|
|
||||||
To make your data persistent, you have to mount `/var/www/app/public/logo` and `/var/www/app/storage`.
|
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
|
### 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)
|
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
|
||||||
|
|||||||
@@ -6,30 +6,20 @@ MAINTAINER Samuel Laulhau <sam@lalop.co>
|
|||||||
# SYSTEM REQUIREMENT
|
# SYSTEM REQUIREMENT
|
||||||
#####
|
#####
|
||||||
ENV PHANTOMJS phantomjs-2.1.1-linux-x86_64
|
ENV PHANTOMJS phantomjs-2.1.1-linux-x86_64
|
||||||
RUN apk update
|
RUN apk update \
|
||||||
RUN apk add libmcrypt-dev
|
&& apk add --no-cache libmcrypt-dev git gmp-dev freetype-dev libjpeg-turbo-dev \
|
||||||
# RUN apk add zlib1g-dev
|
coreutils chrpath fontconfig libpng-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 ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ \
|
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 gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||||
&& docker-php-ext-configure gmp \
|
&& docker-php-ext-configure gmp \
|
||||||
&& docker-php-ext-install iconv mcrypt mbstring pdo pdo_mysql zip gd gmp opcache \
|
&& 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/* \
|
|
||||||
&& echo "php_admin_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED">>/usr/local/etc/php-fpm.d/www.conf
|
&& 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
|
# set recommended PHP.ini settings
|
||||||
# see https://secure.php.net/manual/en/opcache.installation.php
|
# 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
|
# DOWNLOAD AND INSTALL INVOICE NINJA
|
||||||
#####
|
#####
|
||||||
|
|
||||||
ENV INVOICENINJA_VERSION 3.3.1
|
ENV INVOICENINJA_VERSION 4.1.5
|
||||||
|
|
||||||
RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja/archive/v${INVOICENINJA_VERSION}.tar.gz \
|
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/ \
|
&& tar -xzf invoiceninja.tar.gz -C /var/www/ \
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
MYSQL_DATABASE=ninja
|
||||||
|
MYSQL_ROOT_PASSWORD=pwd
|
||||||
|
|
||||||
|
APP_DEBUG=0
|
||||||
APP_DEBUG=1
|
|
||||||
APP_URL=http://localhost:8000
|
APP_URL=http://localhost:8000
|
||||||
|
APP_KEY=SomeRandomStringSomeRandomString
|
||||||
|
APP_CIPHER=AES-256-CBC
|
||||||
DB_USERNAME=root
|
DB_USERNAME=root
|
||||||
DB_PASSWORD=pwd
|
DB_PASSWORD=pwd
|
||||||
DB_HOST=mysql
|
DB_HOST=mysql
|
||||||
49
docker-compose/docker-compose.yml
Normal file
49
docker-compose/docker-compose.yml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: mysql
|
||||||
|
env_file: .env
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./srv/invoiceninja/mysql:/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'
|
||||||
|
|
||||||
@@ -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'
|
|
||||||
Reference in New Issue
Block a user