Update docker container logs FAQ entry.

This commit is contained in:
aforge
2019-09-23 14:53:05 -07:00
parent 661fad6afc
commit 959ec6b295

View File

@ -1,18 +1,15 @@
# Frequently Asked Questions
### Q: Where can I find server logs when running in Docker?<br/>
**A**: The log is in the container at `/var/log/tinode.log`. Attach to a running container with command
**A**: The logs are written to container's stdout. To view the logs, run
```
docker exec -it name-of-the-running-container /bin/bash
```
Then, for instance, see the log with `tail -50 /var/log/tinode.log`
If the container has stopped already, you can copy the log out of the container (saving it to `./tinode.log`):
```
docker cp name-of-the-container:/var/log/tinode.log ./tinode.log
docker logs name-of-the-running-container
```
Alternatively, you can instruct the docker container to save the logs to a directory on the host by mapping a host directory to `/var/log/` in the container. Add `-v /where/to/save/logs:/var/log` to the `docker run` command.
Alternatively, you can access the log file on the host machine at
```
/var/lib/docker/containers/<container id>/<container id>-json.log
```
### Q: How to setup FCM push notifications?<br/>
**A**: If you running the server directly: