mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
docker compose v2
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
||||
data
|
||||
@@ -2,6 +2,7 @@ DockerFile for invoice ninja (https://www.invoiceninja.com/)
|
||||
|
||||
This image is based on `php:7` official version.
|
||||
|
||||
The easiest way to try this image is by cloning this repos and run `docker-compose run`.
|
||||
The easiest way to test Invoice Ninja with docker is by copying the exemple directory and run `docker-compe up`.
|
||||
The first launch could be slow because we create all tables and seed the database, but once youe see `NOTICE: ready to handle connections` all is ready.
|
||||
|
||||
To make your data persistant, you have to mount `/var/www/app/public/logo` and `/var/www/app/storage`.
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
db:
|
||||
image: mysql
|
||||
environment:
|
||||
MYSQL_DATABASE: ninja
|
||||
MYSQL_ROOT_PASSWORD: mdp
|
||||
|
||||
app:
|
||||
image: invoiceninja/invoiceninja
|
||||
links:
|
||||
- db:mysql
|
||||
environment:
|
||||
APP_DEBUG: 1
|
||||
|
||||
web:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
links:
|
||||
- app
|
||||
volumes_from:
|
||||
- app
|
||||
ports:
|
||||
- 80
|
||||
|
||||
cron:
|
||||
image: invoiceninja/invoiceninja
|
||||
links:
|
||||
- db:mysql
|
||||
user: www-data
|
||||
entrypoint: |
|
||||
bash -c 'bash -s <<EOF
|
||||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||
sleep 300s
|
||||
while /bin/true; do
|
||||
DB_USERNAME=root DB_PASSWORD=mdp /usr/local/bin/php /var/www/app/artisan ninja:send-invoices
|
||||
DB_USERNAME=root DB_PASSWORD=mdp /usr/local/bin/php /var/www/app/artisan ninja:send-reminders
|
||||
sleep 1d
|
||||
done
|
||||
EOF'
|
||||
46
exemple/docker-compose.yml
Normal file
46
exemple/docker-compose.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
version: "2"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mysql
|
||||
environment:
|
||||
MYSQL_DATABASE: ninja
|
||||
MYSQL_ROOT_PASSWORD: pwd
|
||||
|
||||
app:
|
||||
image: invoiceninja/invoiceninja
|
||||
links:
|
||||
- db:mysql
|
||||
environment:
|
||||
APP_DEBUG: 1
|
||||
DB_USERNAME: root
|
||||
DB_PASSWORD: pwd
|
||||
|
||||
web:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
links:
|
||||
- app
|
||||
volumes_from:
|
||||
- app
|
||||
ports:
|
||||
- 80
|
||||
|
||||
cron:
|
||||
image: invoiceninja/invoiceninja
|
||||
links:
|
||||
- db:mysql
|
||||
user: www-data
|
||||
environment:
|
||||
APP_DEBUG: 1
|
||||
entrypoint: |
|
||||
bash -c 'bash -s <<EOF
|
||||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||
sleep 300s
|
||||
while /bin/true; do
|
||||
DB_USERNAME=root DB_PASSWORD=pwd /usr/local/bin/php /var/www/app/artisan ninja:send-invoices
|
||||
DB_USERNAME=root DB_PASSWORD=pwd /usr/local/bin/php /var/www/app/artisan ninja:send-reminders
|
||||
sleep 1d
|
||||
done
|
||||
EOF'
|
||||
Reference in New Issue
Block a user