retrievercommunications / docker-jasperserver

Docker image for the community edition of JasperReports® Server.
https://hub.docker.com/r/retriever/jasperserver/
MIT License
46 stars 50 forks source link

Example run command for postgres container #10

Open rdcm opened 6 years ago

rdcm commented 6 years ago

Can you add to README.md example command for postgres?

grange74 commented 6 years ago

Hi, i was planning to do that after #9 was raised but hadn't got around to it. From some quick testing the following seems to work:

To create the simplest Postgres container (it should really mount the data directory onto a persisted volume): docker run -d --name jasperserver_postgres -e POSTGRES_PASSWORD=postgres postgres

To create the simplest jasperserver container point to the above Postgres container: docker run -d --name jasperserver -e DB_TYPE=postgresql -e DB_HOST=db -e DB_PORT=5432 -e DB_USER=postgres -e DB_PASSWORD=postgres --link jasperserver_postgres:db -p 8080:8080 retriever/jasperserver

The key bit for the above command is the DB_TYPE which must be postgresql.

rdcm commented 6 years ago

Thanks a lot! It works :) Do not forget add a description to README.md.