DSM 7.1 What is the different between run docker-compose in ssh or using container manager project?

Currently reading
DSM 7.1 What is the different between run docker-compose in ssh or using container manager project?

5
0
NAS
DS216+II
Operating system
  1. Linux
  2. Windows
Mobile operating system
  1. Android
Currently, I have been try about install immich inside my synology devices.
I have trying to follow the from guideline, but this kind of docker-compose could be used in SSH terminal though docker-compose up -d, and could run website from http://192.168.1.7:2283.
But when I just smoothly convert this docker-compose project into the project provide by containers manage, it not working. I just couldn't open my website and it have a kinds of error like 500 | connect ECONNREFUSED 172.***.***.***:3001.
I have tried using the web station to provide some kinds of port or rename, but it seems not working.

Any suggestions on why this happens or how to fix it?
 
convert this docker-compose project into the project provide by containers manage
The "project" section is the actual docker terminology when using docker-compose format to run containers. With -p you can configure the project name and all that is needed when working with a compose file or multiple compose files.

In any event, that terminology is now being used inside the Container Manager UI and directly points users to create a local folder that will host the yaml file (compose file) for the solution that you want to build up.

Running the compose file via CLI or using the CM UI, should and will result with a successful build so the 500 error that you are getting probably has nothing to do with the way you are triggering this build but rather its configuration (the actual content of the yaml).

Looking at the compose file, this setup includes 8 containers, one of those is also a reverse proxy. Considering that the 3001 port that is being reported here is related to the web app, it looks like not all containers are up and running as they should be in this project/stack.

So 1st be sure that all containers are up and running, and that all of them can communicate. As no network settings are defined, be sure to check what docker network are those containers using as well as do you have any local NAS firewall rules that are blocking communication towards that network range.

Also there is an open discussion on github on this exact issue so you might want to keep an eye on it:

 
Last edited:
Change port 3000 to something else... 33333... and retry.
Sorry about the delay of response, finally i have back to my home.
It seems not relate to this problem, 3000 seems just a port that using inside docker and haven't been explose to other network(i guess?), the only port that could settings is 2283
-- post merged: --

The "project" section is the actual docker terminology when using docker-compose format to run containers. With -p you can configure the project name and all that is needed when working with a compose file or multiple compose files.

In any event, that terminology is now being used inside the Container Manager UI and directly points users to create a local folder that will host the yaml file (compose file) for the solution that you want to build up.

Running the compose file via CLI or using the CM UI, should and will result with a successful build so the 500 error that you are getting probably has nothing to do with the way you are triggering this build but rather its configuration (the actual content of the yaml).

Looking at the compose file, this setup includes 8 containers, one of those is also a reverse proxy. Considering that the 3001 port that is being reported here is related to the web app, it looks like not all containers are up and running as they should be in this project/stack.

So 1st be sure that all containers are up and running, and that all of them can communicate. As no network settings are defined, be sure to check what docker network are those containers using as well as do you have any local NAS firewall rules that are blocking communication towards that network range.

Also there is an open discussion on github on this exact issue so you might want to keep an eye on it:

After checking all the applications, I found that I was a little confused. I didn't understand these logs very much. I went to study them.
 

Attachments

  • Logs.zip
    6.4 KB · Views: 3
Did you stop and remove the container from this first, successful, instance before executing the second one? I'm not sure I am reading your post correctly.
Yes, I had ran docker-compose down from SSH terminal, and checked container view to make sure all the container create by docker-compose has been remove (but image still there)
 
The compose file relies on variables provided by an .env file. You can generate the final compose file in an ssh terminal session using docker compose config. This output is what you want to use as a configuration in the Container Manager.

It would help a great deal, if you share your output of docker compose config here as well, so we get an idea why configuration you actually use.

Regarding logs:
  • immich microservice is not able to communicate with the postgres database due to wrong credentials
  • postgres: the logs show that client password authentication fails.
  • web probably fails because it depends on the microservice which fails due to the database issue
 
The compose file relies on variables provided by an .env file. You can generate the final compose file in an ssh terminal session using docker compose config. This output is what you want to use as a configuration in the Container Manager.

It would help a great deal, if you share your output of docker compose config here as well, so we get an idea why configuration you actually use.

Regarding logs:
  • immich microservice is not able to communicate with the postgres database due to wrong credentials
  • postgres: the logs show that client password authentication fails.
  • web probably fails because it depends on the microservice which fails due to the database issue
this is my generated configuration file.
I was think if it's relate to a error occur when change the network, which the VITE_SERVER_ENDPOINT should be 192.168.1.3 (the current local ip address of nas)?
 
Just out of curiosity: have you tried to generate the rendered compose file using the example compose file and env file without changing anything and post it to the container manager and check if it works?

I see plenty of environment variables in your compose file that do not exist in the original example. In case of doubt, always start making a minimal example work, then start to modify what's needed.

I have no idea what the environment variable VITE_SERVER_ENDPOINT configures: for all we know it could be an url, using the service or container name and container port for container to container communication, or it could be the host name or ip and host port for container to published host port communication (which would be a very weird design).

The variable VITE_SERVER_ENDPOINT is not even documented in the guide you shared... How do you know it actually does anything usefull?
 
Just out of curiosity: have you tried to generate the rendered compose file using the example compose file and env file without changing anything and post it to the container manager and check if it works?

I see plenty of environment variables in your compose file that do not exist in the original example. In case of doubt, always start making a minimal example work, then start to modify what's needed.

I have no idea what the environment variable VITE_SERVER_ENDPOINT configures: for all we know it could be an url, using the service or container name and container port for container to container communication, or it could be the host name or ip and host port for container to published host port communication (which would be a very weird design).

The variable VITE_SERVER_ENDPOINT is not even documented in the guide you shared... How do you know it actually does anything usefull?
Actually, I have tried to replace each variables in compose file with the value in .env file. But I haven't complete test all functions, but the display of it is as same as previours.

VITE_SERVER_ENDPOINT is actually exist due to copy for tutorial, which i couldn't found right now.
 
I have no idea what you are doing, but I just tested it based on the instructions of the guide you linked.

Code:
IMMICH_DIR=/volume1/docker/immich
# create immich folder
mkdir -p ${IMMICH_DIR}
# fetch compose file into immich folder
wget https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml -O ${IMMICH_DIR}/docker-compose.yml
# fetch .env file into immich folder
wget https://github.com/immich-app/immich/releases/latest/download/example.env -O ${IMMICH_DIR}/.env

# create required data folder inside immich folder
mkdir -p ${IMMICH_DIR}/library

Then either execute docker-compose -f ${IMMICH_DIR}/docker-compose.yml up in a terminal,
or execute docker-compose -f ${IMMICH_DIR}/docker-compose.yml config > rendered_compose.yml to generate the compose file with rendered values from the .env file, then paste the content of rendered_compose.yml into the container manger.

Both ways just work fine. Continue the post installations steps, and access immich on http://dsm-ip:2283. If you follow the steps I shared above you get exactly the same compose files I used during testing.

Good luck!
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Old thread notice: There have been no replies in this thread for quite some time. The last reply was on .
The content in this thread may no longer be relevant. It might be better to open a new thread instead.

Similar threads

Why so? A docker container is nothing else then a fenced process on the host. It is a direct sibling of a...
Replies
6
Views
1,499
Oh, I see! That does appear to be a lot easier. Thanks for your reply! (y)
Replies
8
Views
2,776
  • Question
It is realy not complicated to translater container arguments to Synology UI settings. Here is what each...
Replies
2
Views
1,801
Same here This worked for me: Task script: #!/bin/bash cd /volume1/docker/[directory where...
Replies
10
Views
5,643
@one-eyed-king , I have tried your first step: sudo synogroup --add docker and encounter the following...
Replies
11
Views
30,196

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top