I
Immich•3y ago
jmwtac

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
No description
No description
14 Replies
Alex Tran
Alex Tran•3y ago
Which url did you use to access the web?
jrasm91
jrasm91•3y ago
You should look at the immich server logs
jmwtac
jmwtacOP•3y ago
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
bo0tzz
bo0tzz•3y ago
You're using portainer, right? You probably forgot to rename the env file or something like that
jmwtac
jmwtacOP•3y ago
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
No description
jmwtac
jmwtacOP•3y ago
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});
bo0tzz
bo0tzz•3y ago
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?
jmwtac
jmwtacOP•3y ago
version: "3.8"

services:
immich-server:
container_name: immich_server
image: altran1502/immich-server:release
entrypoint: [ "/bin/sh", "./start-server.sh" ]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload

environment:
- NODE_ENV=production
depends_on:
- redis
- database
restart: always

immich-microservices:
container_name: immich_microservices
image: altran1502/immich-server:release
entrypoint: [ "/bin/sh", "./start-microservices.sh" ]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
environment:
- NODE_ENV=production
depends_on:
- redis
- database
restart: always

immich-machine-learning:
container_name: immich_machine_learning
image: altran1502/immich-machine-learning:release
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- model-cache:/cache
environment:
- NODE_ENV=production
restart: always

immich-web:
container_name: immich_web
image: altran1502/immich-web:release
entrypoint: [ "/bin/sh", "./entrypoint.sh" ]
restart: always

redis:
container_name: immich_redis
image: redis:6.2
restart: always

database:
container_name: immich_postgres
image: postgres:14
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: immich
PG_DATA: /var/lib/postgresql/data
volumes:
- pgdata:/var/lib/postgresql/data
restart: always

immich-proxy:
container_name: immich_proxy
image: altran1502/immich-proxy:release
environment:
# Make sure these values get passed through from the env file
- IMMICH_SERVER_URL
- IMMICH_WEB_URL
ports:
- 2283:8080
logging:
driver: none
depends_on:
- immich-server
restart: always

volumes:
pgdata:
model-cache:
version: "3.8"

services:
immich-server:
container_name: immich_server
image: altran1502/immich-server:release
entrypoint: [ "/bin/sh", "./start-server.sh" ]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload

environment:
- NODE_ENV=production
depends_on:
- redis
- database
restart: always

immich-microservices:
container_name: immich_microservices
image: altran1502/immich-server:release
entrypoint: [ "/bin/sh", "./start-microservices.sh" ]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
environment:
- NODE_ENV=production
depends_on:
- redis
- database
restart: always

immich-machine-learning:
container_name: immich_machine_learning
image: altran1502/immich-machine-learning:release
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- model-cache:/cache
environment:
- NODE_ENV=production
restart: always

immich-web:
container_name: immich_web
image: altran1502/immich-web:release
entrypoint: [ "/bin/sh", "./entrypoint.sh" ]
restart: always

redis:
container_name: immich_redis
image: redis:6.2
restart: always

database:
container_name: immich_postgres
image: postgres:14
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: immich
PG_DATA: /var/lib/postgresql/data
volumes:
- pgdata:/var/lib/postgresql/data
restart: always

immich-proxy:
container_name: immich_proxy
image: altran1502/immich-proxy:release
environment:
# Make sure these values get passed through from the env file
- IMMICH_SERVER_URL
- IMMICH_WEB_URL
ports:
- 2283:8080
logging:
driver: none
depends_on:
- immich-server
restart: always

volumes:
pgdata:
model-cache:
bo0tzz
bo0tzz•3y ago
Which install guide did you follow? This doesn't have the env_file in it at all
jmwtac
jmwtacOP•3y ago
yea i removed the env as i added them all in portainer manually
bo0tzz
bo0tzz•3y ago
Something must've gone wrong there then
jmwtac
jmwtacOP•3y ago
ok let me try again Boom, worked now thanks for help
jrasm91
jrasm91•3y ago
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 🙂

Did you find this page helpful?