mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-06 14:37:26 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
083fe9648e | ||
|
|
6ad5e6ec48 | ||
|
|
13487557e6 | ||
|
|
16f77b069e |
@@ -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 4.0.1
|
ENV INVOICENINJA_VERSION 4.1.1
|
||||||
|
|
||||||
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/ \
|
||||||
|
|||||||
13
README.md
13
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,6 +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
|
### Know issue
|
||||||
|
|
||||||
Phantomjs doesn't work on linux alpine https://github.com/ariya/phantomjs/issues/14186
|
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
|
# DOWNLOAD AND INSTALL INVOICE NINJA
|
||||||
#####
|
#####
|
||||||
|
|
||||||
ENV INVOICENINJA_VERSION 4.0.1
|
ENV INVOICENINJA_VERSION 4.1.1
|
||||||
|
|
||||||
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,6 +1,7 @@
|
|||||||
|
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_KEY=SomeRandomStringSomeRandomString
|
||||||
APP_CIPHER=AES-256-CBC
|
APP_CIPHER=AES-256-CBC
|
||||||
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,45 +0,0 @@
|
|||||||
version: "2"
|
|
||||||
|
|
||||||
services:
|
|
||||||
db:
|
|
||||||
image: mysql
|
|
||||||
environment:
|
|
||||||
MYSQL_DATABASE: ninja
|
|
||||||
MYSQL_ROOT_PASSWORD: pwd
|
|
||||||
volumes:
|
|
||||||
- ./var/mysql:/var/lib/mysql
|
|
||||||
|
|
||||||
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