Josh K
Josh K
IImmich
Created by Josh K on 6/2/2025 in #help-desk-support
Permission denied for migrations when running as non-root
with this
build:
context: .
dockerfile_inline: |
FROM ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
RUN mkdir -p /usr/src/app/dist/schema/migrations
RUN chown -R ${PUID}:${GUID} /usr/src/app/dist/schema/migrations
build:
context: .
dockerfile_inline: |
FROM ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
RUN mkdir -p /usr/src/app/dist/schema/migrations
RUN chown -R ${PUID}:${GUID} /usr/src/app/dist/schema/migrations
I'm still curious if there's a better way, and this may break at some point if there's any other files that assume root access.
11 replies
IImmich
Created by Josh K on 6/2/2025 in #help-desk-support
Permission denied for migrations when running as non-root
I ended up replacing this line in my immich_server docker compose config
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
11 replies
IImmich
Created by Josh K on 6/2/2025 in #help-desk-support
Permission denied for migrations when running as non-root
I'm going to check "latest version" in the checklist, but I dn't actually want to update to the 1.133 breaking change until I get this issue figured out
11 replies
IImmich
Created by Josh K on 6/2/2025 in #help-desk-support
Permission denied for migrations when running as non-root
# docker-compose.yml

services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${LIBRARY_LOCATION}:/usr/src/app/static-library:ro
- immich-machine-learning-2:/.config
- immich-machine-learning-2:/.cache
- redis-2:/data
user: "${PUID}:${GUID}"
env_file:
- .env
extends:
file: hwaccel.yml
service: hwaccel
depends_on:
- redis
- database
restart: always
networks:
- immich-server
- traefik

immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
user: "${PUID}:${GUID}"
volumes:
- model-cache-2:/cache
- immich-machine-learning-2:/.config
- immich-machine-learning-2:/.cache
- redis-2:/data
env_file:
- .env
restart: always
networks:
- immich-server

redis:
container_name: immich_redis
user: "${PUID}:${GUID}"
image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
restart: always
networks:
- immich-server
volumes:
- immich-machine-learning-2:/.config
- immich-machine-learning-2:/.cache
- redis-2:/data

database:
container_name: immich_postgres
image: tensorchord/pgvecto-rs:pg14-v0.2.0
env_file:
- .env
user: "${PUID}:${GUID}"
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- ${DB_LOCATION}:/var/lib/postgresql/data
restart: always
networks:
- immich-server

volumes:
pgdata-2:
model-cache-2:
immich-machine-learning-2:
redis-2:

networks:
immich-server:
driver: bridge
traefik:
name: traefik
external: true
# docker-compose.yml

services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${LIBRARY_LOCATION}:/usr/src/app/static-library:ro
- immich-machine-learning-2:/.config
- immich-machine-learning-2:/.cache
- redis-2:/data
user: "${PUID}:${GUID}"
env_file:
- .env
extends:
file: hwaccel.yml
service: hwaccel
depends_on:
- redis
- database
restart: always
networks:
- immich-server
- traefik

immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
user: "${PUID}:${GUID}"
volumes:
- model-cache-2:/cache
- immich-machine-learning-2:/.config
- immich-machine-learning-2:/.cache
- redis-2:/data
env_file:
- .env
restart: always
networks:
- immich-server

redis:
container_name: immich_redis
user: "${PUID}:${GUID}"
image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
restart: always
networks:
- immich-server
volumes:
- immich-machine-learning-2:/.config
- immich-machine-learning-2:/.cache
- redis-2:/data

database:
container_name: immich_postgres
image: tensorchord/pgvecto-rs:pg14-v0.2.0
env_file:
- .env
user: "${PUID}:${GUID}"
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- ${DB_LOCATION}:/var/lib/postgresql/data
restart: always
networks:
- immich-server

volumes:
pgdata-2:
model-cache-2:
immich-machine-learning-2:
redis-2:

networks:
immich-server:
driver: bridge
traefik:
name: traefik
external: true
11 replies