From 771f64787320f44551594352aa7bcbca0b2ebd5a Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 3 Feb 2017 17:39:33 +0100 Subject: [PATCH] make cron work in example --- README.md | 4 +++- example/.env | 13 +++++++++++++ example/docker-compose.yml | 13 +++++-------- 3 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 example/.env diff --git a/README.md b/README.md index 64e92b8..0d9b7dc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,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 and run `docker-compose up`. +The easiest way to test Invoice Ninja with docker is by copying the example directory, run `docker-compose up` and visit http://localhost:8000/ . 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 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 diff --git a/example/.env b/example/.env new file mode 100644 index 0000000..7cd40cb --- /dev/null +++ b/example/.env @@ -0,0 +1,13 @@ + + +APP_DEBUG=1 +APP_URL=http://localhost:8000 +DB_USERNAME=root +DB_PASSWORD=pwd +DB_HOST=mysql +MAIL_HOST=mail.service.host +MAIL_USERNAME=username +MAIL_PASSWORD=password +MAIL_DRIVER=smtp +MAIL_FROM_NAME="My name" +MAIL_FROM_ADDRESS=user@mail.com diff --git a/example/docker-compose.yml b/example/docker-compose.yml index e06f29f..56a7231 100644 --- a/example/docker-compose.yml +++ b/example/docker-compose.yml @@ -11,10 +11,7 @@ services: image: invoiceninja/invoiceninja links: - db:mysql - environment: - APP_DEBUG: 1 - DB_USERNAME: root - DB_PASSWORD: pwd + env_file: .env web: image: nginx @@ -25,15 +22,15 @@ services: volumes_from: - app ports: - - 80 + - 8000:80 cron: image: invoiceninja/invoiceninja links: - db:mysql - user: www-data - environment: - APP_DEBUG: 1 + env_file: .env + volumes_from: + - app entrypoint: | bash -c 'bash -s <