added export module (#538)

This commit is contained in:
Kevin Papst
2019-02-05 21:37:33 +01:00
committed by GitHub
parent 062735c9e3
commit 816866549c
104 changed files with 3770 additions and 608 deletions

View File

@@ -17,11 +17,15 @@ Any issues with the container rather than the application itself should be raise
## Run the docker
docker run -ti -p 8001:8001 --name kimai2 --rm kimai/kimai2:dev
```
docker run -ti -p 8001:8001 --name kimai2 --rm kimai/kimai2:dev
```
You can then access the site on http://127.0.0.1:8001. If that doesn't work check the IP of your docker:
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' kimai2
```
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' kimai2
```
You can find Kimai at that IP on port 8001.
@@ -30,32 +34,42 @@ You can find Kimai at that IP on port 8001.
When using dock-machine on your Mac, you need to use the IP of your machine.
Considering you started the machine named `default`, you find the IP with:
docker-machine ip default
```
docker-machine ip default
```
## Running commands in the docker
You can run any command in the container in this fashion once it is started. Add `-ti` to attach a terminal.
docker exec -ti kimai2 bash
```
docker exec -ti kimai2 bash
```
## Create a user and dummy data
See the docs [here](installation.md) for full instructions, but this creates a user admin/admin with all privileges.
docker exec kimai2 bin/console kimai:create-user admin admin@example.com ROLE_SUPER_ADMIN admin
```
docker exec kimai2 bin/console kimai:create-user admin admin@example.com ROLE_SUPER_ADMIN admin
```
To install the fixtures:
docker exec kimai2 bin/console kimai:reset-dev
```
docker exec kimai2 bin/console kimai:reset-dev
```
## Developing against the docker
It is possible to mount your source tree and sqlite DB into the container at run time. **N.B. The sqlite database needs to writable by the www-data user.** Use ```chown 33:33 kimai.sqlite``` on the host machine.
docker run --rm -d -p 8001:8001 \
-v $(pwd)/src:/opt/kimai/src \
-v $(pwd)/var/data/kimai.sqlite:/opt/kimai/var/data/kimai.sqlite \
--name kimai2 kimai/kimai2:dev
```
docker run --rm -d -p 8001:8001 \
-v $(pwd)/src:/opt/kimai/src \
-v $(pwd)/var/data/kimai.sqlite:/opt/kimai/var/data/kimai.sqlite \
--name kimai2 kimai/kimai2:dev
```
Now edits in the local file tree will be served by the container and database changes will persist.