Rudloff / alltube

Web GUI for youtube-dl
GNU General Public License v3.0
2.96k stars 582 forks source link

heroku hot-fix for docker deploying #317

Closed rsoorajs closed 3 years ago

rsoorajs commented 3 years ago

Fixed apache2: Configuration error: More than one MPM loaded and Permission denied: AH00072: make_sock: could not bind to address [::]:80

now the code will work fine

Rudloff commented 3 years ago

Can you explain how this is used?

Why can't Heroku use mpm_event?

rsoorajs commented 3 years ago

Can you explain how this is used?

Why can't Heroku use mpm_event?

The "php" docker image is enabling the module "mpm_prefork", and thus creates the file /etc/apache2/mods-enabled/mpm_prefork.load. Heroku later injects its own set of configuration files which includes the file /etc/apache2/mods-enabled/mpm_event.load. We end up with 2 mpm modules loaded, which makes apache fail.

so i disabled mpm_event module on heroku app startup and our app will be start without any issues.also i resolved port binding issue for heroku in this pr.all changes were made without touching any other codes,so when we deploy this code to heroku as a docker container,my newly changed code will fix all the issues and the app will go online.hope you understand

Rudloff commented 3 years ago

Yes, the Docker image was not written for Heroku.

But I am not a big fan of this hack. If would be cleaner to fix the Docker image to:

rsoorajs commented 3 years ago

Yes, the Docker image was not written for Heroku.

But I am not a big fan of this hack. If would be cleaner to fix the Docker image to:

  • Use mpm_event by default or have an environment variable allowing to choose the MPM
  • Have an environment variable allowing to choose the port

The Dockerfile is clean and i didnt even touched it.i just made changes to work this dockerfile on heroku,thats why two seperate files for the fix .

Rudloff commented 3 years ago

I understand what you did. It's just that I would prefer if this could be fixed directly in the Dockerfile because editing the content of a Docker image after it has been built is not very clean (and you script could break if the Docker image changes too much).

But if you don't want to go through the trouble of doing that and keep the Bash script, please move it to resources/ and rename it to something more explicit (like heroku-docker-start.sh).

Also please regroup #317 and #316 into a single PR, since one can not work without the other.