From 377ed9e207c28d66d782500f5d9de3f408eb5e8c Mon Sep 17 00:00:00 2001 From: Johan Janssens Date: Sun, 29 May 2022 02:26:34 +0200 Subject: [PATCH] Force rebuild for Gitpod --- .github/Dockerfile | 3 +++ .gitpod.yml | 9 ++++++++- .gitpod/Dockerfile | 7 ++----- config/s6/mysql-init.d/101-perm.sh | 3 +++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/Dockerfile b/.github/Dockerfile index e170853c..7ef99016 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -18,6 +18,9 @@ EXPOSE 8080 8443 80 443 # MySQL EXPOSE 3306 33060 +# Install sudo (required for Gitpod) +RUN apt-get install -y --no-install-recommends sudo + # Install MySQL COPY ./config/s6/mysql-init.d /etc/mysql-init.d/ COPY ./config/mysql /etc/mysql/ diff --git a/.gitpod.yml b/.gitpod.yml index 9f717e31..ddca5eef 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -13,12 +13,19 @@ tasks: export APP_PRELOAD=off export APP_CACHE=off export APP_DEBUG=on + export COMPOSER_NO_DEV=1 command: | clear sudo -E /init - name: Composer - Joomlatools Server - command: /bin/bash -e /var/scripts/composer_install.sh + command: sudo /bin/bash -e /var/scripts/composer_install.sh + + - name: Install Latest Joomla + command: sudo joomla site:create joomla --release=latest + + - name: Install Latest Wordpress + command: sudo folioshell site:create joomla --release=latest - name: Terminal - Joomlatools Server command: | diff --git a/.gitpod/Dockerfile b/.gitpod/Dockerfile index 169dc29c..f8e1332e 100644 --- a/.gitpod/Dockerfile +++ b/.gitpod/Dockerfile @@ -2,7 +2,7 @@ # Stage: base # # Build gitpod server -# Version: 1.0.0-dev build 30 +# Version: 1.0.0-dev build 32 ARG IMAGE_TAG=latest FROM ghcr.io/joomlatools/joomlatools-server:${IMAGE_TAG} as base @@ -14,8 +14,6 @@ ENV APP_DATA=/srv/www \ APP_HTTP=80 \ APP_HTTPS=443 -ENV MYSQL_USER=gitpod - ENV COMPOSER_ALLOW_SUPERUSER=1 \ COMPOSER_HOME=/tmp @@ -31,8 +29,7 @@ RUN tar xvzf /tmp/mason-linux.tar.gz -C /tmp; \ chmod 755 /usr/bin/mason # User -RUN apt-get install -y --no-install-recommends sudo; \ - useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod; \ +RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod; \ usermod -a -G www-data gitpod; \ usermod -a -G mysql gitpod; \ sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers diff --git a/config/s6/mysql-init.d/101-perm.sh b/config/s6/mysql-init.d/101-perm.sh index 57ddd5c2..f8ecc9bb 100644 --- a/config/s6/mysql-init.d/101-perm.sh +++ b/config/s6/mysql-init.d/101-perm.sh @@ -12,6 +12,9 @@ then CREATE USER IF NOT EXISTS '${MYSQL_USER}'@'localhost'; ALTER USER '${MYSQL_USER}'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_PASS}'; GRANT ALL ON *.* TO '${MYSQL_USER}'@'localhost'; + CREATE USER IF NOT EXISTS 'gitpod'@'localhost'; + ALTER USER 'gitpod'@'localhost' IDENTIFIED WITH auth_socket; + GRANT ALL ON *.* TO 'gitpod'@'localhost'; CREATE USER IF NOT EXISTS 'root'@'localhost'; ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket; GRANT ALL ON *.* TO 'root'@'localhost';