Skip to content

Instantly share code, notes, and snippets.

@plajjan
Last active October 11, 2023 10:17
Show Gist options
  • Save plajjan/227ff46bea392afbf158ff6a4aa1c083 to your computer and use it in GitHub Desktop.
Save plajjan/227ff46bea392afbf158ff6a4aa1c083 to your computer and use it in GitHub Desktop.
NIPAP docker compose
nipap-db:
image: nipap/postgres-ip4r
volumes:
- ./db-data:/var/lib/postgresql/data
environment:
- PGDATA=/var/lib/postgres/data/pgdata
- POSTGRES_USER=nipap
- POSTGRES_PASSWORD=S3cretDBPas5
- POSTGRES_DB=nipap
nipapd:
image: nipap/nipapd:master
links:
- nipap-db
environment:
- DB_USERNAME=nipap
- DB_PASSWORD=S3cretDBPas5
- DB_HOST=nipap-db
- DB_NAME=nipap
- NIPAP_USERNAME=www
- NIPAP_PASSWORD=nipapP4ssw0rd
nipap-www:
image: nipap/nipap-www
links:
- nipapd
environment:
- NIPAPD_USERNAME=www
- NIPAPD_PASSWORD=nipapP4ssw0rd
@sutusa
Copy link

sutusa commented Sep 29, 2021

web app is opening really good, but unable to login through default and with my given password too. Any remarks ?

Another github user (@x4x) forked this file and fixed the issue:
https://gist.github.com/x4x/16072e9a055b39f1bcb36cfc821beaad

They added a ports section to allow external connections, and added 2 environment variables: WWW_USERNAME and WWW_PASSWORD.

nipap-www:
  image: nipap/nipap-www
  ports:
    - "80:80"
  links:
    - nipapd
  environment:
    - NIPAPD_USERNAME=www
    - NIPAPD_PASSWORD=nipapP4ssw0rd
    - WWW_USERNAME=admin
    - WWW_PASSWORD=123456

The www container's entrypoint.sh needs these environment variables to allow authentication, it seems:
https://github.com/SpriteLink/NIPAP/blob/2e765db3b27eabfad81ee6e49f96a504c9d636f8/nipap-www/entrypoint.sh#L10-L12

I was able to connect and login with these added changes.

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