Development Setup
I was looking to help out more with this project, but I am having some issues. I have a Linux system with VSCode and found I needed to install npm and now I'm stuck with jest issues. What are the appropriate steps to set up?
35 Replies
Actually, the easiest way to get up and running is to use docker.
If you do a
make dev
in the root directory, it'll run a docker compose command which will start the api/microservices/web/proxy with npm/node already installed in the container running in dev mode (hot reload, etc.)Interesting I'll give that a go.
1. Go into
server
run npm i
2. Go into web
run npm i
3. Populate .env
file for development environment in docker
folder
4. From the root directory run make dev
Why do you need to run
npm i
? That's a part of the docker file.We have some of this information here btw: https://immich.app/docs/developer/setup
Setup | Immich
Environment
for local intellisense
../server:/usr/src/app
I haven't really tried just to run make dev without installing the local node_modules
interesting
well that simplify it
There's already a volume mount for the whole server directory
OK, thanks that is great, learn something new everyday hehe
Lol, aren't you the one that set this up? 😛
I've always had to run npm i
lemme test it real quick interestig in the result
There is another anon volume for node_modules specifically, maybe that doesn't sync the two
Hmm vscode doesn't have intellisense if you don't install it locally

And
node_modules
is mounted as root
so yeah, install
npm i
first then perform make dev
is how it works on my enviroment
you don't have to do that?Anyway @EnochPrime Good info to start from here https://immich.app/docs/developer/architecture
Architecture | Immich
High Level Diagram
I think I have done npm i, but I'm already setup to do development in node on my machine so I ran it there before I started doing the docker thing. It seems like it defeats the point a bit using docker AND having to install the deps locally.
When you are on your machine, can you try to run make dev without node_modules install in the
server
to see if this only apply to my development environment?You will need to create a
.env
in the docker
folder, similar to how you would in a normal installation.I did
What version of compose do you have installed?
docker-compose --version
Apparently something not functional...
On the docker website they talk about removing the provided packages and then re-installing from a specific repo. Maybe this is what those instructions are for.
I'll have to look into that, thanks. I deploy with docker swarm which supports (most of) compose. Didn't know it was broken.
Is
docker compose version
any different?
You could try make dev-new
My understanding is swarm implements the specification directly rather than using the python package. Although I've never dug into those details.
It looks like there used to be a separate project
docker-compose
, which was implemented in python.
The new version (v2
) was rewritten in go and is available as a subcommand and provided as part of the docker
executable. So docker compose
Ah so maybe I just need to remove the python package.
It sounds like they pretty much do the same thing, but you call one with a space and one with a dash. You might have the space one working on your system and it looks like
make dev-new
uses the space version.Not sure if it is valid at this point, but...
This is what's installed on my system FWIW

Installed
docker-compose-plugin
and make dev-new
appears to be working.