Open hielh opened 2 years ago
I Installed the container of bitnami on devilbox using this code below:
# mariadb & jasperreports
# ____________________________________________________________________________
mariadb:
image: mariadb:latest
ports:
- 3306:3306
volumes:
- ~/apps/mariadb:/var/lib/mysql
networks:
app_net:
ipv4_address: 172.16.238.251
environment:
- MYSQL_ROOT_PASSWORD=S3cret
- MYSQL_PASSWORD=An0thrS3crt
- MYSQL_USER=jasperserver
- MYSQL_DATABASE=jasper_db
jasperreports:
image: docker.io/bitnami/jasperreports:latest
ports:
- '8080:8080'
# The line below allows you to provide your own JasperReports configuration files, to be copied to WEB-INF
# - "./config:/bitnami/jasperreports-mounted-conf"
depends_on:
- mariadb
networks:
app_net:
ipv4_address: 172.16.238.250
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- JASPERREPORTS_DATABASE_HOST=mariadb
- JASPERREPORTS_DATABASE_PORT_NUMBER=3306
- JASPERREPORTS_DATABASE_USER=root
- JASPERREPORTS_DATABASE_PASSWORD=S3cret
- JASPERREPORTS_DATABASE_NAME=jasper_db`
But how could we use curl to call the api service.
the problem is if I'm using postman to get my result from Rest services:
The result from postman:
but using php code from devilbox I get :
Failed to connect to jasperreports.loc port 8080: Connection refused
@cytopia any help please why I can't call my jasperreport container from php container.
@hielh localhost
is not going to work, as this is the localhost service of the PHP container and there is no jasperreport service running. You should try either:
curl -I http://172.16.238.250:8080
localhost
inside the PHP containerJust a question you might want to ask yourself, is your use of JasperReport linked to your use of DevilBox? If not, you probably better keep DevilBox for what it is very good at, namely to deal with LAMP versions, and use something like Portainer for the rest of the Docker-related products.
What is your idea or feature suggestion?
Our need in one of our project is to use Jasperreport
Benefits
By default devilbox doesn't content any container of Jasperreport. I tried to use another docker image from bitnami: https://github.com/bitnami/bitnami-docker-jasperreports/blob/master/docker-compose.yml
But I get an error of: port is already in use, I changed the port to 8080:8080, but there is another problem of connexion with database.
I can't acces to jasperreport from localhost:8080
How could we use this docker image as container of devilbox
Where can we find information about this?
https://github.com/TIBCOSoftware/JS-Docker
Are you willing to provide a PR to address this?
No response