Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Available PHP Versions are EOL #549

Open
Stoyvo opened this issue Oct 19, 2021 · 9 comments
Open

Available PHP Versions are EOL #549

Stoyvo opened this issue Oct 19, 2021 · 9 comments

Comments

@Stoyvo
Copy link

Stoyvo commented Oct 19, 2021

PHP 7.3 is the latest supported version on App Engine, and this version of PHP was EOL January 2021. Google has offered an out-dated version of PHP, this needs to change. PHP 7.4 and PHP 8 are the actively supported versions by PHP and Google should be offering at least these versions.

What is the ETA for supported PHP versions to be used on Google App Engine?

@Stoyvo Stoyvo changed the title PHP 8 Support Required Available PHP Versions are EOL Oct 19, 2021
@andreladocruz
Copy link

News???

@Stoyvo
Copy link
Author

Stoyvo commented Dec 29, 2021

@donmccasland Removed PHP 7.4 and 8.0 in this commit:
a2fe0f2

I'm curious, where is the right location for this issue? It appears to be outside of this project.

@andreladocruz
Copy link

andreladocruz commented Dec 29, 2021

@Stoyvo,

I am trying to build a custom image with 7.4 and 8.0.

I can not understand why they don't support 7.4 or 8.0 versions

@andreladocruz
Copy link

@Stoyvo, @donmccasland

Do you know how can I create my own php7.4/8 image using this code?

I tried to build using an alpine image, but it's not working.

https://hub.docker.com/r/digitalmanagerguru/appengine-php-webserver

You can see the docker settings here:

https://bitbucket.org/digitalmanagerguru/appengine-webserver/src/dev/

This image is MUCH smaller than google's one. :P

@Stoyvo
Copy link
Author

Stoyvo commented Jan 5, 2022

@andreladocruz I created a custom image, tried flexible environment, moved to Standard afterwards. I believe this gets most of the way.

https://gist.github.com/Stoyvo/e81ba08103fecee7d7711b4239245cef

@andreladocruz
Copy link

@Stoyvo ,

thanks for your help! =)

I made an image too and now it's running on our staging environment.

Looking into your files, I saw we got almost the same approach, using alpine. =)

The final image is 80% smaller and deploys 50% quicker than google's one.

I will move it into production soon. =)

@andreladocruz
Copy link

andreladocruz commented Jan 5, 2022

@Stoyvo ,

my base Dockerfile

FROM alpine:3.15.0

LABEL Maintainer="Dev Team <dev@digitalmanager.guru>" \
    Description="Base image for appengine php webserver"

RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories

RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories

RUN apk update

# Install Base Packages
RUN apk --no-cache add \
    bash \
    curl \
    nginx \
    procps \
    supervisor

# Install PHP Packages and Extensions
RUN apk --no-cache add \
    php7 \
    php7-bcmath \
    php7-ctype \
    php7-curl \
    php7-dev \
    php7-dom \
    php7-fileinfo \
    php7-fpm \
    php7-gd \
    php7-gmp \
    php7-intl \
    php7-json \
    php7-mbstring \
    php7-mysqli \
    php7-opcache \
    php7-openssl \
    php7-pcntl \
    php7-pdo \
    php7-pdo_mysql \
    php7-phar \
    php7-pear \
    php7-pecl-grpc \
    php7-pecl-protobuf \
    php7-pecl-redis \
    php7-posix \
    php7-simplexml \
    php7-soap \
    php7-tokenizer \
    php7-xml \
    php7-xmlwriter \
    php7-zip

# Create symlink so programs depending on `php` still function
RUN rm -f /usr/bin/php 
RUN ln -s /usr/bin/php7 /usr/bin/php

# Install Composer
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
RUN rm -rf composer-setup.php

# Configure nginx
COPY config/nginx.conf /etc/nginx/nginx.conf

# Configure PHP-FPM
COPY config/fpm-pool.conf /etc/php7/php-fpm.d/www.conf
COPY config/php.ini /etc/php7/conf.d/custom.ini

# Configure supervisord
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Setup document root
RUN mkdir -p /var/www/html

# Make sure files/folders needed by the processes are accessable when they run under the nobody user
RUN chown -R nobody.nobody /var/www/html && \
    chown -R nobody.nobody /run && \
    chown -R nobody.nobody /var/lib/nginx && \
    chown -R nobody.nobody /var/log/nginx

# Switch to use a non-root user from here on
USER nobody

# Add application
WORKDIR /var/www/html
COPY --chown=nobody src/ /var/www/html/

# Expose the port nginx is reachable on
EXPOSE 8080

# Let supervisord start nginx & php-fpm
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

# Configure a healthcheck to validate that everything is up&running
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping

@Stoyvo
Copy link
Author

Stoyvo commented Jun 23, 2022

@andreladocruz you should make a gist and link to this issue, this way the community can continue to follow updates and offer suggestions

@andreladocruz
Copy link

@Stoyvo .. be my guest and do it with the data above.

I have no interest in this kind of bureaucracy or responsibility

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants