-
-
Notifications
You must be signed in to change notification settings - Fork 30
Description
I am trying to deploy the compose stack with the prebuild davis image, like mentioned in the compose file.
davis:
build:
context: ../
dockerfile: ./docker/Dockerfile
args:
fpm_user: 101:101
image: davis:latest
# If you want to use a prebuilt image from Github
# image: ghcr.io/tchapi/davis:edge
adapting the codesnippets to
davis:
image: ghcr.io/tchapi/davis:5.3.0
This deploys fine at first, but the migration with the command:
docker compose exec davis sh -c "APP_ENV=prod bin/console doctrine:migrations:migrate --no-interaction"
fails with a permission error:
In StreamHandler.php line 241:
There is no existing directory at "/var/www/davis/var/log" and it could not be created: Permission denied
doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--no-all-or-nothing] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--] [<version>]
From what i can track down the prebuild image is built with fpm_user: 82:82, but nginx needs 101:101. Since they share the volume, one gets a permission error.
i tried setting the user for the service davis as 101:101 with the user: "101:101" in the compose file as well as PUID=101 PGID=101 in the .env. Both seem to be ignored.
I don't want to clone the whole repository to build the image at every deployment. Did i miss a setting to use the prebuilt image with the right UID/GID?