diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 1a2fba34..648b6863 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,4 +1,4 @@ -FROM gitpod/workspace-mysql +FROM gitpod/workspace-mysql:latest USER gitpod @@ -11,22 +11,23 @@ RUN sudo touch /var/log/workspace-image.log \ RUN echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections \ && sudo apt-get update -q \ - && sudo apt-get -y install php7.4-fpm rsync grc shellcheck apt-transport-https ca-certificates \ + && sudo apt-get -y install php8.0-fpm rsync grc shellcheck apt-transport-https ca-certificates \ && sudo apt-get clean \ - && sudo update-ca-certificates + && sudo update-ca-certificates \ + && sudo rm -rf /var/lib/apt/lists/* COPY --chown=gitpod:gitpod .gp/conf/xdebug/xdebug.ini /tmp -RUN wget http://xdebug.org/files/xdebug-3.0.4.tgz \ - && tar -xvzf xdebug-3.0.4.tgz \ - && cd xdebug-3.0.4 \ +RUN wget http://xdebug.org/files/xdebug-3.1.1.tgz \ + && tar -xvzf xdebug-3.1.1.tgz \ + && cd xdebug-3.1.1 \ && phpize \ && ./configure --enable-xdebug \ && make \ - && sudo cp modules/xdebug.so /usr/lib/php/20190902/xdebug.so \ - && sudo bash -c "echo -e '\nzend_extension = /usr/lib/php/20190902/xdebug.so\n[XDebug]\nxdebug.client_host = 127.0.0.1\nxdebug.client_port = 9009\nxdebug.log = /var/log/xdebug.log\nxdebug.mode = debug\nxdebug.start_with_request = trigger\n' >> /etc/php/7.4/cli/conf.d/20-xdebug.ini" \ - && sudo bash -c "echo -e '\nzend_extension = /usr/lib/php/20190902/xdebug.so\n[XDebug]\nxdebug.client_host = 127.0.0.1\nxdebug.client_port = 9009\nxdebug.log = /var/log/xdebug.log\nxdebug.mode = debug\nxdebug.start_with_request = trigger\n' >> /etc/php/7.4/apache2/conf.d/20-xdebug.ini" \ - && sudo cp /tmp/xdebug.ini /etc/php/7.4/mods-available/20-xdebug.ini \ - && sudo ln -s /etc/php/7.4/mods-available/20-xdebug.ini /etc/php/7.4/fpm/conf.d + && sudo cp modules/xdebug.so /usr/lib/php/20200930/xdebug.so \ + && sudo bash -c "echo -e '\nzend_extension = /usr/lib/php/20200930/xdebug.so\n[XDebug]\nxdebug.client_host = 127.0.0.1\nxdebug.client_port = 9009\nxdebug.log = /var/log/xdebug.log\nxdebug.mode = debug\nxdebug.start_with_request = trigger\n' >> /etc/php/8.0/cli/conf.d/20-xdebug.ini" \ + && sudo bash -c "echo -e '\nzend_extension = /usr/lib/php/20200930/xdebug.so\n[XDebug]\nxdebug.client_host = 127.0.0.1\nxdebug.client_port = 9009\nxdebug.log = /var/log/xdebug.log\nxdebug.mode = debug\nxdebug.start_with_request = trigger\n' >> /etc/php/8.0/apache2/conf.d/20-xdebug.ini" \ + && sudo cp /tmp/xdebug.ini /etc/php/8.0/mods-available/20-xdebug.ini \ + && sudo ln -s /etc/php/8.0/mods-available/20-xdebug.ini /etc/php/8.0/fpm/conf.d COPY --chown=gitpod:gitpod .gp/bash/update-composer.sh /tmp RUN sudo bash -c ". /tmp/update-composer.sh" && rm /tmp/update-composer.sh @@ -52,6 +53,3 @@ RUN cp /tmp/server-functions.sh ~/.bashrc.d/server-functions \ # Customs cli's and user scripts for /usr/local/bin COPY --chown=gitpod:gitpod .gp/bash/bin/hot-reload.sh /usr/local/bin RUN sudo mv /usr/local/bin/hot-reload.sh /usr/local/bin/hot-reload - -# Add global composer bin folder to $PATH -ENV PATH="$PATH:$HOME/.config/composer/vendor/bin:$GITPOD_REPO_ROOT/vendor/bin" diff --git a/.gp/bash/init-complete.sh b/.gp/bash/init-complete.sh index 83747734..c1075a7b 100644 --- a/.gp/bash/init-complete.sh +++ b/.gp/bash/init-complete.sh @@ -31,3 +31,6 @@ bash .gp/bash/helpers.sh persist_file /var/log/workspace-init.log # Set initialized flag - Keep this at the bottom of the file bash .gp/bash/helpers.sh mark_as_inited gp sync-done gitpod-inited + +# Add Workspace/Project composer bin folder to $PATH +export PATH="$PATH:$HOME/.config/composer/vendor/bin:$GITPOD_REPO_ROOT/vendor/bin" diff --git a/.gp/conf/php-fpm/php-fpm.conf b/.gp/conf/php-fpm/php-fpm.conf index 4ab375ee..a1ce4bd5 100644 --- a/.gp/conf/php-fpm/php-fpm.conf +++ b/.gp/conf/php-fpm/php-fpm.conf @@ -1,6 +1,6 @@ [global] -pid = /tmp/php7.4-fpm.pid -error_log = /tmp/php7.4-fpm.log +pid = /tmp/php8.0-fpm.pid +error_log = /tmp/php8.0-fpm.log [www] listen = 127.0.0.1:9000 @@ -11,4 +11,4 @@ pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 -pm.max_spare_servers = 3 \ No newline at end of file +pm.max_spare_servers = 3 diff --git a/.gp/conf/xdebug/xdebug.ini b/.gp/conf/xdebug/xdebug.ini index 8aec5485..897d4e28 100644 --- a/.gp/conf/xdebug/xdebug.ini +++ b/.gp/conf/xdebug/xdebug.ini @@ -1,6 +1,6 @@ -zend_extension=/usr/lib/php/20190902/xdebug.so +zend_extension=/usr/lib/php/20200930/xdebug.so xdebug.client_host = 127.0.0.1 xdebug.client_port = 9009 xdebug.log = /var/log/xdebug.log xdebug.mode = debug -xdebug.start_with_request = trigger \ No newline at end of file +xdebug.start_with_request = trigger diff --git a/.gp/snippets/server-functions.sh b/.gp/snippets/server-functions.sh index ba880011..82b7d7e6 100644 --- a/.gp/snippets/server-functions.sh +++ b/.gp/snippets/server-functions.sh @@ -68,7 +68,7 @@ stop_apache() { } start_nginx() { - nginx & /usr/sbin/php-fpm7.4 --fpm-config .gp/conf/php-fpm/php-fpm.conf + nginx & /usr/sbin/php-fpm8.0 --fpm-config .gp/conf/php-fpm/php-fpm.conf local exit_code=$? (( exit_code == 0 )) || return local log_monitor_type= @@ -88,7 +88,7 @@ start_nginx() { } stop_nginx() { - nginx -s stop && pkill php-fpm7.4 + nginx -s stop && pkill php-fpm8.0 local exit_code=$? (( exit_code == 0 )) || return local pid