INSaFLU / docker

Easy installation for INSaFLU made by docker
7 stars 6 forks source link

up.sh problem #22

Closed mlpereira87 closed 1 year ago

mlpereira87 commented 1 year ago

When I run up.sh script in the docker directory (after installing INSAFLU and TELEVIR through docker), the following happens:

image

In the web browser:

image

dsobral commented 1 year ago

I haven't fully diagnosed why this happens, but I think it's because $BASE_PATH_DATA/insaflu/log/httpd is handled by the root user inside the container and somehow the container cannot write anything inside that folder, causing httpd to be in an error state (because it cannot write the logs).

This usually fixes it for me:

ctrl^c chmod -R 777 $BASE_PATH_DATA/insaflu/log [where $BASE_PATH_DATA is the folder you defined in .env] .> /up.sh If you want the service to run in the background, instead of up.sh just do: docker compose up insaflu-server -d

If you see a 400 error, this means you are not running in localhost and need to change the .env file by adding the IP of your machine (in this case it seems to be 10.101.34.77) in the ALLOWED_HOSTS field and restart the containers.

Hope it helps, Daniel

muzzamil1234 commented 1 year ago

i am facing same problem, even i try with local host Screenshot from 2023-06-23 17-14-25

Screenshot from 2023-06-23 17-14-52

dsobral commented 1 year ago

The configuration looks OK.

Make sure all services are running.

I assume that machine 39.22.240.13 is allowing the port 8080 to be visible to the outside (ie can you launch other services using that port?).

Sometimes restarting the apache inside the container helps: docker exec -it insaflu-server restart-apache

Daniel

mlpereira87 commented 1 year ago

I did the chmod 777 and added the ip into the .env file, like @muzzamil1234 did and:

image

In the browser:

image

Also tried in the localhost browser and it was the same

dsobral commented 1 year ago

Apparently it is not assuming the .env file

Let's first make sure the IP is in the .env ALLOWED_HOSTS line inside the container.

Go in the container:

docker exec -it insaflu-server bash cd /insaflu_web/INSaFLU Edit the .env file to and make sure the IP 10.101.34.77 is in the ALLOWED_HOSTS line (if not, add it and save the file) Restart apache. docker exec -it insaflu-server restart-apache

Daniel

mlpereira87 commented 1 year ago

Now it's working! Thank you!

dsobral commented 1 year ago

Thank you for the patience.

We'll try to have a more convenient prebuilt image as soon as possible.

Daniel