I am trying to deploy a Dockerfile from Windows to Heroku however the Heroku Dyno keeps crashing with error code: H10, the Dockerfile works fine locally.
2020-04-13T22:25:09.749176+00:00 app[web.1]: AH00534: apache2: Configuration error: More than one MPM loaded.
2020-04-13T22:26:40.155292+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=***.herokuapp.com request_id=*** fwd="***" dyno= connect= service= status=503 bytes= protocol=https
I am using the following Dockerfile
FROM php:7.2-apache
ENV PORT 3000
CMD sed -i "s/80/$PORT/g" /etc/apache2/sites-enabled/000-default.conf /etc/apache2/ports.conf && docker-php-entrypoint apache2-foreground
COPY src /var/www/html/
RUN chown -R www-data:www-data /var/www/
I am using the Heroku CLI with the following:
heroku create
heroku container:push web
heroku container:release web
I have found many articles stating this is probably a port issue: Docker PHP + Apache deployment on Heroku crashes
Any help would be greatly appreciated
So after hours of testing I finally found the answer, it appears to be an issue with Heroku & Docker: https://github.com/docker-library/wordpress/issues/293
Also helpful: https://www.rickpeyton.com/programming/deploy-wordpress-to-heroku-with-docker/
Luckily there is a quick fix, be sure to restart your Dyno after:
heroku labs:enable --app=YOUR-APP runtime-new-layer-extract
I hope this saves someone time.