Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pelly31 opened this issue Nov 25, 2020 · 6 comments
Closed

Comments

@pelly31
Copy link

pelly31 commented Nov 25, 2020

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

@xwyam
Copy link

xwyam commented Mar 3, 2021

Same problem with Docker 19.03.13 on Debian sid.

@kwadroke
Copy link

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

@kawaii
Copy link
Member

kawaii commented Apr 29, 2021

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

@kwadroke
Copy link

kwadroke commented Apr 29, 2021

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
Copy link

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
Copy link

I did use newer containers as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants