That all seems correct, the way to expose services with a docker-compose is by using the:
ports:
- 2283:3001
That means that you expose whatever is at port 3001 in the cointainer (in this case the Immich server inside the docker container, which is exposed by default to 3001) to port 2283 of the host machine (in this case, your LXC container). So it should work if everything else is set up correctly.
The 172.x.x.x networks are normal internal networks for docker to use, normally you needn't care about them because you just expose whichever port you need via the ports command above.
Are you following this step by step to set it all up? is your .env file properly set up? did you check the containers logs?
Ah! now I see the problem
It's clearly having permission problems with the image library directory.
Also:
with this command you are trying to mount this directory from your LXC machine:
into this directory inside the immich container:
And then you also try to mount a second directory there in the next line. But immich doesn't use /mnt/immich for its library, it uses this:
You should NOT edit the default docker-compose.yml file. Instead you should only edit the .env file like so:
I can also see that there's a specific tutorial on how to set it up with portainer. In that case you might have to edit the docker compose file to replace .env with stack.env and place the contents of the env file in the advanced-> environment variables of portainer.
Try these things and ask here again if you can't get it running.