Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Inherit from Heroku's stack
FROM heroku/cedar:14
FROM heroku/heroku:18-build

# Internally, we arbitrarily use port 3000
ENV PORT 3000

# Which versions?
ENV PHP_VERSION 5.6.15
ENV HTTPD_VERSION 2.4.17
ENV NGINX_VERSION 1.8.0
ENV PHP_VERSION 7.3.7
ENV HTTPD_VERSION 2.4.39
ENV NGINX_VERSION 1.16.0

# Create some needed directories
RUN mkdir -p /app/.heroku/php /app/.profile.d
Expand All @@ -17,28 +17,28 @@ WORKDIR /app/user
ENV PATH /app/.heroku/php/bin:/app/.heroku/php/sbin:$PATH

# Install Apache
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-cedar-14-master/apache-$HTTPD_VERSION.tar.gz | tar xz -C /app/.heroku/php
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-18-develop/apache-$HTTPD_VERSION.tar.gz | tar xz -C /app/.heroku/php
# Config
RUN curl --silent --location https://raw.githubusercontent.com/heroku/heroku-buildpack-php/5a770b914549cf2a897cbbaf379eb5adf410d464/conf/apache2/httpd.conf.default > /app/.heroku/php/etc/apache2/httpd.conf
RUN curl --silent --location https://raw.githubusercontent.com/heroku/heroku-buildpack-php/ded7e8a02e472387fb9cdb98e84b7f82d8eb3b91/conf/apache2/httpd.conf.default > /app/.heroku/php/etc/apache2/httpd.conf
# FPM socket permissions workaround when run as root
RUN echo "\n\
Group root\n\
" >> /app/.heroku/php/etc/apache2/httpd.conf

# Install Nginx
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-cedar-14-master/nginx-$NGINX_VERSION.tar.gz | tar xz -C /app/.heroku/php
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-18-develop/nginx-$NGINX_VERSION.tar.gz | tar xz -C /app/.heroku/php
# Config
RUN curl --silent --location https://raw.githubusercontent.com/heroku/heroku-buildpack-php/5a770b914549cf2a897cbbaf379eb5adf410d464/conf/nginx/nginx.conf.default > /app/.heroku/php/etc/nginx/nginx.conf
RUN curl --silent --location https://raw.githubusercontent.com/heroku/heroku-buildpack-php/ded7e8a02e472387fb9cdb98e84b7f82d8eb3b91/conf/nginx/nginx.conf.default > /app/.heroku/php/etc/nginx/nginx.conf
# FPM socket permissions workaround when run as root
RUN echo "\n\
user nobody root;\n\
" >> /app/.heroku/php/etc/nginx/nginx.conf

# Install PHP
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-cedar-14-master/php-$PHP_VERSION.tar.gz | tar xz -C /app/.heroku/php
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-18-develop/php-$PHP_VERSION.tar.gz | tar xz -C /app/.heroku/php
# Config
RUN mkdir -p /app/.heroku/php/etc/php/conf.d
RUN curl --silent --location https://raw.githubusercontent.com/heroku/heroku-buildpack-php/5a770b914549cf2a897cbbaf379eb5adf410d464/conf/php/php.ini > /app/.heroku/php/etc/php/php.ini
RUN curl --silent --location https://raw.githubusercontent.com/heroku/heroku-buildpack-php/ded7e8a02e472387fb9cdb98e84b7f82d8eb3b91/conf/php/php.ini > /app/.heroku/php/etc/php/php.ini
# Enable all optional exts
RUN echo "\n\
user_ini.cache_ttl = 30 \n\
Expand All @@ -65,7 +65,7 @@ extension=xsl.so\n\
" >> /app/.heroku/php/etc/php/php.ini

# Install Composer
RUN curl --silent --location "https://lang-php.s3.amazonaws.com/dist-cedar-14-master/composer-1.0.0alpha11.tar.gz" | tar xz -C /app/.heroku/php
RUN curl --silent --location "https://lang-php.s3.amazonaws.com/dist-heroku-18-develop/composer-1.8.6.tar.gz" | tar xz -C /app/.heroku/php

# copy dep files first so Docker caches the install step if they don't change
ONBUILD COPY composer.lock /app/user/
Expand All @@ -81,4 +81,4 @@ ONBUILD RUN cat composer.json | python -c 'import sys,json; sys.exit("post-insta

# TODO: run "composer compile", like Heroku?

# ENTRYPOINT ["/usr/bin/init.sh"]
# ENTRYPOINT ["/usr/bin/init.sh"]