mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
Explanation how view log files
Fix #137 * Better description how to find log files * Change default log to file but can be overridden by env var
This commit is contained in:
committed by
Samuel Laulhau
parent
4f3f7ca8fe
commit
8a6622bbbb
27
README.md
27
README.md
@@ -53,6 +53,7 @@ docker run -d \
|
||||
-e DB_DATABASE='ninja' \
|
||||
-e DB_USERNAME='ninja' \
|
||||
-e DB_PASSWORD='ninja' \
|
||||
-e LOG=errorlog \
|
||||
-p '9000:9000' \
|
||||
invoiceninja/invoiceninja
|
||||
```
|
||||
@@ -67,6 +68,32 @@ Run `cp .env.example .env` and change the environment variables as needed.
|
||||
The file assumes that all your persistent data is mounted from `/srv/invoiceninja/`.
|
||||
Once started, the application should be accessible at http://localhost:8000.
|
||||
|
||||
|
||||
## Debugging your Docker setup
|
||||
|
||||
Even when running your Invoice Ninja setup with Docker - errors can occur. Depending on where the error happens - the webserver, Invoice Ninja or the database - different log files can be responsible.
|
||||
|
||||
### Show logs without `docker-compose`
|
||||
|
||||
If you are not running the `docker-compose` you first need to find the container id for your php container with `docker ps`. Then you can run
|
||||
|
||||
```shell
|
||||
docker logs -f <CONTAINER NAME>
|
||||
```
|
||||
|
||||
This gives you a constant output of the log files for the php container.
|
||||
|
||||
### Show logs with `docker-compose`
|
||||
|
||||
If you are running the `docker-compose` setup you can output all logs, from all containers, with the following command
|
||||
|
||||
```shell
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
||||
If you better want a physical log file in in your `storage/logs` folder, just remove this line `-e LOG=errorlog` from the [usage](#usage) command or change it to `-e LOG=single`. Both works.
|
||||
|
||||
|
||||
### Known issues
|
||||
|
||||
Phantomjs doesn't work on linux alpine https://github.com/ariya/phantomjs/issues/14186.
|
||||
|
||||
@@ -52,7 +52,6 @@ RUN curl -o ninja.zip -SL https://download.invoiceninja.com/ninja-v${INVOICENINJ
|
||||
######
|
||||
# DEFAULT ENV
|
||||
######
|
||||
ENV LOG errorlog
|
||||
ENV SELF_UPDATER_SOURCE ''
|
||||
ENV PHANTOMJS_BIN_PATH /usr/local/bin/phantomjs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user