Skip to content

Commit

Permalink
Use start script to support heroku $PORT env var at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
wilson29thid committed Jan 10, 2020
1 parent d98f36c commit 56ddc13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ RUN curl --silent --show-error --location \

# Add plugins
COPY plugins plugins

# Entrypoint script to support heroku $PORT env var at runtime
COPY run-apache2.sh /usr/local/bin
CMD [ "run-apache2.sh" ]
5 changes: 5 additions & 0 deletions run-apache2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

# https://github.com/docker-library/wordpress/issues/293
sed -i "s/Listen 80/Listen ${PORT:-80}/g" /etc/apache2/ports.conf
/usr/local/bin/docker-php-entrypoint apache2-foreground

0 comments on commit 56ddc13

Please sign in to comment.