Closed amammes closed 11 months ago
Fixed by adding
"repositories": [
{
"type": "composer",
"url": "https://repo.packagist.org"
}
],
You could just create the directory /opt/kimai/var/packages/
You do not need these mailer packages. They just "simplify" how to setup the MAILER DSN.
@tobybatch any idea why the directory is missing? It is in git: https://github.com/kimai/kimai/tree/main/var/packages
This is what I see in my container based on image: kimai/kimai2:apache
root@71ce333c1353:/opt/kimai/var# ls -la total 24 drwxr-xr-x 5 www-data www-data 4096 Dec 4 23:08 . drwxr-xr-x 1 www-data www-data 4096 Dec 5 14:45 .. drwxr-xr-x 3 www-data www-data 4096 Dec 5 14:46 cache drwxr-xr-x 2 www-data www-data 4096 Dec 4 23:08 data -rw-r--r-- 1 www-data www-data 6 Dec 5 14:41 installed drwxr-xr-x 2 www-data www-data 4096 Dec 4 22:58 log
The kimai documentation says this, but does not give an example for Sendgrid. I tried several configs, none of them worked.
Be aware that you can achieve the same in most cases (without installing composer packages) by rewriting the MAILER_URL, e.g.:
Gmail: smtps://{username}:{password}@smtp.gmail.com:465 Sendinblue: smtps://{username}:{password}@smtp-relay.sendinblue.com:465
mkdir /opt/kimai/var/packages solved the composer require error. Thanks, all is working now with some manual intervention
kimai:
image: kimai/kimai2:apache
container_name : kimai1-kimai
volumes:
- ./kimai/var:/opt/kimai/var
ports:
- 8022:22
Here you mount the entire var directory in to the image. This means that dir will be empty when the container starts. You want to look at bind mounts instead
Usually you shouldn't use composer inside the container anyway... But is that something for the docs?
@tobybatch thanks for the tip about the volume. You were right, I was screwing up the container by mounting var like that.
@kevinpapst you are correct about "composer require" or "composer update" from inside the container screwing up the container. The file permissions leave a broken kimai instance.
@kevinpapst you are also correct that Sendgrid doesn't need extra packages. I set it up like this and it worked fine: MAILER_URL=smtps://apikey:redacted_apikey_goes_here@smtp.sendgrid.net:465
Hi, I am trying to add sendgrid support and kimai instructions say that I need to add the symfony/sendgrid-mailer package. However, "composer require symfony/sendgrid-mailer" fails with the following output:
I checked out /opt/kimai/composer.json and it has the following repository which does not exist on the file system.
I am sorry but I am not experienced in php and much less with composer parameters, but I believe the repository path is incorrect in /opt/kimai/composer.json
Desktop (please complete the following information):
Server: Docker Engine - Community Engine: Version: 24.0.7 API version: 1.43 (minimum version 1.12) Go version: go1.20.10 Git commit: 311b9ff Built: Thu Oct 26 09:08:02 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.25 GitCommit: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f runc: Version: 1.1.10 GitCommit: v1.1.10-0-g18a0cb0 docker-init: Version: 0.19.0 GitCommit: de40ad0
version: '3.5' services:
mysql: image: mysql:5.7 container_name : kimai1-mysql environment:
default
kimai: image: kimai/kimai2:apache container_name : kimai1-kimai volumes:
default
phpmyadmin: image: phpmyadmin container_name : kimai1-phpmyadmin restart: always environment: PMA_HOST: kimai1-mysql PMA_ABSOLUTE_URI: redacted UPLOAD_LIMIT: 768M PMA_PORT: 3306 networks:
networks: nginx-proxy-manager_default: external: true default: