mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-01 03:57:25 +01:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ef75b29ff | ||
|
|
e6df981f06 | ||
|
|
27bdb5d95b | ||
|
|
206fe5db2d | ||
|
|
4e5022fcc4 | ||
|
|
ded7e32051 | ||
|
|
d2ae9b365b | ||
|
|
612645fad2 | ||
|
|
192f6d7648 | ||
|
|
083fe9648e | ||
|
|
6ad5e6ec48 | ||
|
|
13487557e6 | ||
|
|
16f77b069e | ||
|
|
58c4eb66d4 | ||
|
|
d044303647 | ||
|
|
09b5b84750 | ||
|
|
2932f92f4c | ||
|
|
3ad282ac29 | ||
|
|
507451d7ca | ||
|
|
2d563e4b73 | ||
|
|
991b22e121 | ||
|
|
c4e8f3ea0b | ||
|
|
ee272cd52f | ||
|
|
a60567ae16 | ||
|
|
d81542e536 | ||
|
|
19333d150a |
@@ -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.6.1
|
||||
ENV INVOICENINJA_VERSION 4.2.2
|
||||
|
||||
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/ \
|
||||
@@ -61,14 +61,7 @@ RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja
|
||||
######
|
||||
# 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
|
||||
|
||||
|
||||
13
README.md
13
README.md
@@ -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,6 +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
|
||||
|
||||
@@ -42,7 +42,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
|
||||
# DOWNLOAD AND INSTALL INVOICE NINJA
|
||||
#####
|
||||
|
||||
ENV INVOICENINJA_VERSION 3.6.1
|
||||
ENV INVOICENINJA_VERSION 4.2.2
|
||||
|
||||
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/ \
|
||||
|
||||
@@ -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
|
||||
52
docker-compose/docker-compose.yml
Normal file
52
docker-compose/docker-compose.yml
Normal 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:
|
||||
|
||||
@@ -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