Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
improved docs (#544)
Browse files Browse the repository at this point in the history
* improved docs

* missing charset and version

* typo

* typo
  • Loading branch information
kevinpapst authored Aug 29, 2023
1 parent 3f165a0 commit 799a534
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kimai-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: '[Deprocated do not use] Build release'
name: '[Deprecated] Build release'

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ifndef TIMEZONE
endif

ifndef KIMAI_VERSION
KIMAI_VERSION := master
KIMAI_VERSION := main
endif

ZAP := $(shell echo $(KIMAI_VERSION) | egrep -q "[0-9].[0-9]+" && echo matched)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Run the latest production build:
docker run --rm --name kimai-test \
-ti \
-p 8001:8001 \
-e DATABASE_URL=mysql://kimai:[email protected]:3399/kimai \
-e DATABASE_URL=mysql://kimai:[email protected]:3399/kimai?charset=utf8&serverVersion=5.7 \
--add-host=host.docker.internal:host-gateway \
kimai/kimai2:apache
```
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
environment:
- [email protected]
- ADMINPASS=changemeplease
- DATABASE_URL=mysql://kimaiuser:kimaipassword@sqldb/kimai
- DATABASE_URL=mysql://kimaiuser:kimaipassword@sqldb/kimai?charset=utf8&serverVersion=5.7
- TRUSTED_HOSTS=nginx,localhost,127.0.0.1
- MAILER_URL=smtp://mailer:1025
- [email protected]
Expand Down
21 changes: 12 additions & 9 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ The FPM image is smaller (~640mb) but requires a web server to provide the http

This allows over releases of Kimai to be built. You can specify anything that would be passed to a git clone command.

* A tag or release, e.g. `KIMAI=10.0.2`
* A branch name, e.g. `KIMAI=master`
* A tag or release, e.g. `KIMAI=2.0.31`
* A branch name, e.g. `KIMAI=main`

### TZ

Expand All @@ -48,16 +48,16 @@ The PHP timezone for the php build. Defaults to Europe/Berlin.

## Examples

Build a dev image of Kimai 1.10.1 that uses the apache bundled web server:
Build a dev image of Kimai 2.0.31 that uses the apache bundled web server:

```bash
docker build --target=dev --build-arg KIMAI=10.0.1 --build-arg BASE=apache .
docker build --target=dev --build-arg KIMAI=2.0.31 --build-arg BASE=apache .
```

Build a prod, FPM image of Kimai 1.10.2, localised for the UK
Build a prod, FPM image of Kimai 2.0.31, localised for the UK

```bash
docker build --target=prod --build-arg KIMAI=10.0.2 --build-arg BASE=fpm --build-arg TZ=Europe/London .
docker build --target=prod --build-arg KIMAI=2.0.31 --build-arg BASE=fpm --build-arg TZ=Europe/London .
```

## Extending the image
Expand All @@ -77,14 +77,17 @@ RUN docker-php-ext-install -j$(nproc) xsl xml xmlrpc xmlwriter simplexml
FROM kimai/kimai2:apache-1.12-prod
COPY --from=php-base /usr/local/etc/php/conf.d/docker-php-ext-xsl.ini /usr/local/etc/php/conf.d/docker-php-ext-xsl.ini
COPY --from=php-base /usr/local/lib/php/extensions/no-debug-non-zts-20190902/xsl.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/xsl.so

```

Attention: the above example is outdated and does not work with Kimai 2.x.

## Building for other architectures, Pi, Mac etc

Currently the CI chain doesn't do this for us but it is possible to build your own image for ARMN cpus. **Note** Symfony doesn't seem to support ARM7, so older Pi's are not supported.
Currently, the CI chain doesn't do this for us, but it is possible to build your own image, e.g. for ARM CPUs.

**Note** Kimai doesn't seem to support 32-bit builds, so older Pi's are not supported.

The process to build it relies on Buildx, install that from here <https://github.com/docker/buildx>
The process to build it relies on `Buildx`, install that from here <https://github.com/docker/buildx>

And then you can build an alternate architecture:

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Run the latest production build:
docker run --rm --name kimai-test \
-ti \
-p 8001:8001 \
-e DATABASE_URL=mysql://kimai:kimai@${HOSTNAME}:3399/kimai \
-e DATABASE_URL=mysql://kimai:kimai@${HOSTNAME}:3399/kimai?charset=utf8&serverVersion=5.7 \
kimai/kimai2:apache
```

3. Add a user using the terminal

```bash
docker exec -ti kimai-test \
/opt/kimai/bin/console kimai:create-user admin [email protected] ROLE_SUPER_ADMIN
/opt/kimai/bin/console kimai:user:create admin [email protected] ROLE_SUPER_ADMIN
```

Now, you can access the Kimai instance at <http://localhost:8001>.
Expand Down
12 changes: 6 additions & 6 deletions docs/runtime-args.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ The following settings can set at runtime:

### Memory limit

the Maximum amount of memory a script may consume, <https://php.net/memory-limit>
The maximum amount of memory a script may consume, <https://php.net/memory-limit>

```bash
memory_limit=512
memory_limit=512M
```

## Kimai/symfony core settings
## Kimai core settings

See the symfony and Kimai docs for more info on these.
See the Kimai and Symfony docs for more info on these.

```bash
DATABASE_URL=mysql://user:pass@hodt/dbname
DATABASE_URL=mysql://user:pass@hodt/dbname?charset=utf8&serverVersion=5.7
APP_SECRET=change_this_to_something_unique
TRUSTED_PROXIES=nginx,localhost,127.0.0.1
TRUSTED_HOSTS=nginx,localhost,127.0.0.1
Expand Down Expand Up @@ -45,7 +45,7 @@ GROUP_ID=1000

## Alternate DB config

It is possible to pass the DB config in individual values. If the ENV variable ```DB_TYPE``` is set then the following values will be expected:
It is possible to pass the DB config in individual values. If the ENV variable ```DB_TYPE``` is set then the following values will be expected:

The ```DB_TYPE``` must be `mysql`:

Expand Down

0 comments on commit 799a534

Please sign in to comment.