Deploying Moodle Docker

Deploying Moodle Docker

by doodle kahan -
Number of replies: 1

I'm using moodle-docker: https://github.com/moodlehq/moodle-docker and trying to run it on a cloud VPS (virtual private server), I've bought a domain and link it to the public ip address provided by the VPS.

I've cloned a Moodle: https://github.com/moodle/moodle repository in the VPS and set up the moodle-docker to point to it like so

export MOODLE_DOCKER_WWWROOT=~/Sources/moodle &&
export MOODLE_DOCKER_DB=mysql &&
export MOODLE_DOCKER_WEB_HOST=my-domain.my.id &&
export MOODLE_DOCKER_WEB_PORT=8000

but when I open my-domain.my.id:8000 it give me error Connection refused. I also tried to use curl even from inside the VPS itself, here is the command:

curl -v -g 'http://my-domain.my.id:8000'

the result:

*   Trying 103.170.85.180:8000...
* TCP_NODELAY set
* connect to 103.170.85.180 port 8000 failed: Connection refused
* Failed to connect to my-domain.my.id port 8000: Connection refused
* Closing connection 0
curl: (7) Failed to connect to my-domain.my.id port 8000: Connection refused

I also tried to run a custom web server on it to make sure that I can access it from the internet. The web server run on port 8085, and i can curl it just fine:

curl -v -g 'http://my-domain.my.id:8085/ping'
*   Trying 103.170.85.180:8085...
* TCP_NODELAY set
* Connected to my-domain.my.id (103.170.85.180) port 8085 (#0)
> GET /ping HTTP/1.1
> Host: my-domain.my.id:8085
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Content-Type: application/json; charset=utf-8
< Content-Length: 54
< ETag: W/"36-wY0ccM5thB7kDQk7rQPWw2Kfc/Y"
< Date: Mon, 11 Jul 2022 03:45:35 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
< 
* Connection #0 to host my-domain.my.id left intact
{"status":"running","time":"2022-07-11T03:45:35.204Z"}
moodle docker: https://github.com/moodlehq/moodle-docker/blob/master/bin/moodle-docker-composecheck-here

I've been tinkering for a few days with no result so if you have anything that i could try feel free to comment



Average of ratings: -