Help: Setup Connection error
Just deployed my Immich docker compose follwoing install guide. but i get a connection error thru the proxy url. My portainer containers are as follows: and I am getting


14 Replies
Which url did you use to access the web?
You should look at the immich server logs
im getting Error: Config validation error: "DB_USERNAME" is required. "DB_PASSWORD" is required. "DB_DATABASE_NAME" is required but they are in my env
You're using portainer, right? You probably forgot to rename the env file or something like that
database:
container_name: immich_postgres
image: postgres:14
environment:
POSTGRES_PASSWORD: $DB_PASSWORD
POSTGRES_USER: $DB_USERNAME
POSTGRES_DB: $DB_DATABASE_NAME
PG_DATA: /var/lib/postgresql/data
volumes:
- pgdata:/var/lib/postgresql/data
restart: always

so i tried by passing them directly in the environment and i still get this error: Error: Config validation error: "DB_USERNAME" is required. "DB_PASSWORD" is required. "DB_DATABASE_NAME" is required
2023-03-09T17:54:01.101013086Z at Function.forRoot (/usr/src/app/node_modules/@nestjs/config/dist/config.module.js:75:23)
2023-03-09T17:54:01.101020194Z at Object.<anonymous> (/usr/src/app/dist/apps/immich/apps/immich/src/app.module.js:31:35)
2023-03-09T17:54:01.101027433Z at Module._compile (node:internal/modules/cjs/loader:1105:14)
2023-03-09T17:54:01.101035884Z at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
2023-03-09T17:54:01.101044717Z at Module.load (node:internal/modules/cjs/loader:981:32)
2023-03-09T17:54:01.101051654Z at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2023-03-09T17:54:01.101058009Z at Module.require (node:internal/modules/cjs/loader:1005:19)
2023-03-09T17:54:01.101066410Z at require (node:internal/modules/cjs/helpers:102:18)
2023-03-09T17:54:01.101075413Z at Object.<anonymous> (/usr/src/app/dist/apps/immich/apps/immich/src/main.js:12:22)
2023-03-09T17:54:01.101082736Z at Module._compile (node:internal/modules/cjs/loader:1105:14)
2023-03-09T17:54:33.337825399Z /usr/src/app/node_modules/@nestjs/config/dist/config.module.js:75
2023-03-09T17:54:33.337878066Z throw new Error(
Config validation error: ${error.message}
);The yaml snipped you posted is for the postgres container, but the error is from the server container
Can you post the yaml for that one?
Which install guide did you follow? This doesn't have the env_file in it at all
yea i removed the env as i added them all in portainer manually
Something must've gone wrong there then
ok let me try again
Boom, worked now thanks for help
Yup, when you pass the database envs to postgres it'll use them to init the db, but you still need to pass them to immich-server and microservices so they can connect 🙂