[BUG] improve local development experience #933

Closed
opened 2026-02-04 23:37:53 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @uhthomas on GitHub (Jun 12, 2023).

The bug

I've found it a little hard to develop with Immich locally for a couple of reasons, it would be nice to take some time to improve this to encourage more contributors and also for more accurate testing/development. Primary things which come to mind:

  • There isn't much documentation on how to hack with Immich. There is https://immich.app/docs/developer/setup, but it's missing some key points like "how do I run all tests" or "how do I run a fresh development environment and rebuild the world".
  • Some of the developer tooling does a poor job of self documentation. The Makefile for instance has targets which do exactly the same thing, but with different names. The lack of comments to explain what or why doesn't really help. There is no make test or anything either.
  • Clean environments are almost impossible to create in my experience. I tried really hard to force Docker to delete all data and yet make dev or make dev-update will still have data persisted. I tried docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) && docker system prune -a --volumes -f which did nothing. I also tried docker-compose down -f -v and docker-compose rm -f -v without much success.

The OS that Immich Server is running on

N/A

Version of Immich Server

N/A

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

N/A

Additional information

N/A

Originally created by @uhthomas on GitHub (Jun 12, 2023). ### The bug I've found it a little hard to develop with Immich locally for a couple of reasons, it would be nice to take some time to improve this to encourage more contributors and also for more accurate testing/development. Primary things which come to mind: - There isn't much documentation on how to hack with Immich. There is https://immich.app/docs/developer/setup, but it's missing some key points like "how do I run all tests" or "how do I run a fresh development environment and rebuild the world". - Some of the developer tooling does a poor job of self documentation. The [Makefile](https://github.com/immich-app/immich/blob/756f4e59860ce25bdd7e1bc572f1846c8db341e1/Makefile) for instance has targets which do exactly the same thing, but with different names. The lack of comments to explain what or why doesn't really help. There is no `make test` or anything either. - Clean environments are almost impossible to create in my experience. I tried really hard to force Docker to delete all data and yet `make dev` or `make dev-update` will still have data persisted. I tried `docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) && docker system prune -a --volumes -f` which did nothing. I also tried `docker-compose down -f -v` and `docker-compose rm -f -v` without much success. ### The OS that Immich Server is running on N/A ### Version of Immich Server N/A ### Version of Immich Mobile App N/A ### Platform with the issue - [ ] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML N/A ``` ### Your .env content ```Shell N/A ``` ### Reproduction steps ```bash N/A ``` ### Additional information N/A
OVERLORD added the nice to havedocumentation labels 2026-02-04 23:37:53 +03:00
Author
Owner

@uhthomas commented on GitHub (Jun 12, 2023):

Also there is .env.test and example.env, which can be confusing to understand which is the right thing to use for local dev.

@uhthomas commented on GitHub (Jun 12, 2023): Also there is [.env.test](https://github.com/immich-app/immich/blob/756f4e59860ce25bdd7e1bc572f1846c8db341e1/docker/.env.test) and [example.env](https://github.com/immich-app/immich/blob/756f4e59860ce25bdd7e1bc572f1846c8db341e1/docker/example.env), which can be confusing to understand which is the right thing to use for local dev.
Author
Owner

@uhthomas commented on GitHub (Jun 13, 2023):

I've also noticed that the containers run as root by default and mess up all the file system permissions for the repository. Not nice. I have to sudo rm -rf the upload folder, and the permissions of actual source code were changed too. I deleted had to delete the repo and clone it again.

@uhthomas commented on GitHub (Jun 13, 2023): I've also noticed that the containers run as root by default and mess up all the file system permissions for the repository. Not nice. I have to `sudo rm -rf` the upload folder, and the permissions of actual source code were changed too. I deleted had to delete the repo and clone it again.
Author
Owner

@bo0tzz commented on GitHub (Jul 20, 2023):

I haven't looked into them enough yet to know for sure whether they solve these problems, but devcontainers could maybe be helpful here. If done right, they should also allow us to create a relatively seamless setup for developing in Github Codespaces, which would be a nice bonus.

@bo0tzz commented on GitHub (Jul 20, 2023): I haven't looked into them enough yet to know for sure whether they solve these problems, but [devcontainers](https://containers.dev/) could maybe be helpful here. If done right, they should also allow us to create a relatively seamless setup for developing in Github Codespaces, which would be a nice bonus.
Author
Owner

@jrasm91 commented on GitHub (Jan 13, 2024):

The docs, docker compose file, and makefile have all been updated.

@jrasm91 commented on GitHub (Jan 13, 2024): The docs, docker compose file, and makefile have all been updated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#933