movim_docker icon indicating copy to clipboard operation
movim_docker copied to clipboard

/usr/local/bin/docker-entrypoint.sh: line 14: POSTGRES_DB: unbound variable

Open pelly31 opened this issue 4 years ago • 6 comments

Hi! I get this error when i run docker. Maybe is in the bash script "docker-entrypoint.sh". Why? Do i something wrong? I build first and then run the container. Build run successfully. Regards, Peter

pelly31 avatar Nov 25 '20 22:11 pelly31

Same problem with Docker 19.03.13 on Debian sid.

xwyam avatar Mar 03 '21 16:03 xwyam

Still a problem. Debian Buster x86_64 using docker-compose.

kwadroke avatar Apr 29 '21 17:04 kwadroke

Well, did you set that variable when running the container? Like in the example documentation?

services:
  movim:
    environment:
      MOVIM_ADMIN: admin
      MOVIM_PASSWORD: password
      MOVIM_DOMAIN: http://localhost
      MOVIM_PORT: 8080
      MOVIM_INTERFACE: 0.0.0.0
      POSTGRES_DB: movim
      POSTGRES_HOST: postgresql
      POSTGRES_PORT: 5432
      POSTGRES_USER: movim
      POSTGRES_PASSWORD: changeme
    image: movim/movim:0.19
    volumes:
    - ${PWD}/movim:/var/www/html:rw

kawaii avatar Apr 29 '21 17:04 kawaii

Yes, it is there. Pretty much copy & pasted.

My docker-compose.yaml. Not on a production system, so I don't care about the passwords.

version: '3.7'
services:
  prosody:
    image: prosody/prosody:latest
    environment:
    - LOCAL:xadmin
    - DOMAIN:localhost
    - PASSWORD:3r6j1r-1p
    ports:
    - 5222:5222
    - 5347:5347
    #volumes:
    #- ${PWD}/prosody/configuration:/etc/prosody
    #- ${PWD}/prosody/logs:/var/log/prosody
    #- ${PWD}/prosody/modules:/usr/lib/prosody-modules

  movim:
    environment:
    - MOVIM_ADMIN:admin
    - MOVIM_PASSWORD:passw0rd
    - MOVIM_DOMAIN:http://localhost
    - MOVIM_PORT:8080
    - MOVIM_INTERFACE:0.0.0.0
    - POSTGRES_DB:movim
    - POSTGRES_HOST:postgresql
    - POSTGRES_PORT:5432
    - POSTGRES_USER:movim
    - POSTGRES_PASSWORD:i44Cv1t0
    image: movim/movim:latest
    volumes:
    - ${PWD}/movim:/var/www/html:rw

  nginx:
    image: nginx:mainline-alpine
    ports:
    - 8081:80
    volumes:
    - ${PWD}/movim:/var/www/html:ro
    - ${PWD}/nginx:/etc/nginx/conf.d:ro

  postgresql:
    environment:
    - POSTGRES_DB:movim
    - POSTGRES_PASSWORD:i44Cv1t0
    - POSTGRES_USER:movim
    image: postgres:13.1-alpine
    volumes:
    - ${PWD}/postgres/data:/var/lib/postgresql/data:rw

Playing with adding prosody in there.

kwadroke avatar Apr 29 '21 18:04 kwadroke

Ok, Tweaked my docker-compose.yaml file. Was getting errors from the initial copy-paste, and then my changes didn't work.

Non-erroring out docker-compose.yaml

version: '3.7'
services:
  prosody:
    image: prosody/prosody:latest
    environment:
      - LOCAL=xadmin
      - DOMAIN=localhost
      - PASSWORD=3r6j1r-1p
    ports:
      - 5222:5222
      - 5347:5347
    #volumes:
    #  - ${PWD}/prosody/configuration:/etc/prosody
    #  - ${PWD}/prosody/logs:/var/log/prosody
    #  - ${PWD}/prosody/modules:/usr/lib/prosody-modules


  postgresql:
    image: postgres
    environment:
      - POSTGRES_DB=movim
      - POSTGRES_PASSWORD=i44Cv1t0
      - POSTGRES_USER=movim
    volumes:
      - ${PWD}/postgres/data:/var/lib/postgresql/data:rw

  movim:
    environment:
      - MOVIM_ADMIN=admin
      - MOVIM_PASSWORD=passw0rd
      - MOVIM_DOMAIN=http://localhost
      - MOVIM_PORT=8080
      - MOVIM_INTERFACE=0.0.0.0
      - POSTGRES_DB=movim
      - POSTGRES_HOST=postgresql
      - POSTGRES_PORT=5432
      - POSTGRES_USER=movim
      - POSTGRES_PASSWORD=i44Cv1t0
    image: movim/movim:latest
    volumes:
    - ${PWD}/movim:/var/www/html:rw

  nginx:
    image: nginx:mainline-alpine
    ports:
      - 8081:80
    volumes:
      - ${PWD}/movim:/var/www/html:ro
      - ${PWD}/nginx:/etc/nginx/conf.d:ro

kwadroke avatar Apr 29 '21 18:04 kwadroke

I did use newer containers as well.

kwadroke avatar Apr 29 '21 18:04 kwadroke