diff --git a/.github/workflows/ci-pull_requests.yml b/.github/workflows/ci-pull_requests.yml index cbdaecbf3..30e56f80f 100644 --- a/.github/workflows/ci-pull_requests.yml +++ b/.github/workflows/ci-pull_requests.yml @@ -12,6 +12,9 @@ on: jobs: phpcomposer: runs-on: ubuntu-20.04 + env: + DOCKER_BUILDKIT: 0 + BUILDKIT_PROGRESS: plain steps: - uses: actions/checkout@v3 @@ -41,3 +44,14 @@ jobs: run: | cd backend php7.4 /usr/bin/composer update --no-dev --prefer-dist --no-progress + + - name: Build the all-in-one Docker image + run: docker build --no-cache . --file contrib/Dockerfile --tag echothrust/echoctf.red-all-in-one:latest + - name: Build the DB Docker image + run: docker build --no-cache . --file contrib/Dockerfile-mariadb --tag echothrust/echoctf.red-db:latest + - name: Build the frontend Docker image + run: docker build --no-cache . --file contrib/Dockerfile-frontend --tag echothrust/echoctf.red-frontend:latest + - name: Build the backend Docker image + run: docker build --no-cache . --file contrib/Dockerfile-backend --tag echothrust/echoctf.red-backend:latest + - name: Build the vpn Docker image + run: docker build --no-cache . --file contrib/Dockerfile-vpn --tag echothrust/echoctf.red-vpn:latest diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 18d169297..a656d1d3b 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -55,6 +55,8 @@ jobs: runs-on: ubuntu-20.04 env: GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUBOAUTHTOKEN }} + DOCKER_BUILDKIT: 0 + BUILDKIT_PROGRESS: plain steps: - name: Setup PHP with PECL extension uses: shivammathur/setup-php@v2 @@ -83,15 +85,15 @@ jobs: php7.4 /usr/bin/composer update --no-dev --prefer-dist --no-progress - name: Build the all-in-one Docker image - run: docker build --squash . --file contrib/Dockerfile --tag echothrust/echoctf.red-all-in-one:latest + run: docker build --no-cache --squash . --file contrib/Dockerfile --tag echothrust/echoctf.red-all-in-one:latest - name: Build the DB Docker image - run: docker build --squash . --file contrib/Dockerfile-mariadb --tag echothrust/echoctf.red-db:latest + run: docker build --no-cache --squash . --file contrib/Dockerfile-mariadb --tag echothrust/echoctf.red-db:latest - name: Build the frontend Docker image - run: docker build --squash . --file contrib/Dockerfile-frontend --tag echothrust/echoctf.red-frontend:latest + run: docker build --no-cache --squash . --file contrib/Dockerfile-frontend --tag echothrust/echoctf.red-frontend:latest - name: Build the backend Docker image - run: docker build --squash . --file contrib/Dockerfile-backend --tag echothrust/echoctf.red-backend:latest + run: docker build --no-cache --squash . --file contrib/Dockerfile-backend --tag echothrust/echoctf.red-backend:latest - name: Build the vpn Docker image - run: docker build --squash . --file contrib/Dockerfile-vpn --tag echothrust/echoctf.red-vpn:latest + run: docker build --no-cache --squash . --file contrib/Dockerfile-vpn --tag echothrust/echoctf.red-vpn:latest - name: Login to DockerHub run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p${{ secrets.DOCKER_PASSWORD }} diff --git a/contrib/Dockerfile-frontend b/contrib/Dockerfile-frontend index 0df6fe0c7..fa38ea534 100644 --- a/contrib/Dockerfile-frontend +++ b/contrib/Dockerfile-frontend @@ -30,7 +30,7 @@ RUN set -ex \ && chmod a+x /usr/local/bin/composer \ && sed -ie "s/127.0.0.1/${MYSQL_HOST}/g" ${RED_APP}/config/cache.php \ && echo " 'yii\db\Connection', 'dsn' => 'mysql:host=${MYSQL_HOST};dbname=${MYSQL_DATABASE}', 'username' => '${MYSQL_USER}', 'password' => '${MYSQL_PASSWORD}', 'charset' => 'utf8mb4', ];">${RED_APP}/config/db.php \ - && mkdir -p ${RED_APP}/web/assets ${RED_APP}/runtime ${RED_APP}/web/images/avatars/team \ + && mkdir -p ${RED_APP}/web/assets ${RED_APP}/runtime ${RED_APP}/web/images/avatars/team ${RED_APP}/web/uploads\ && chown -R www-data ${RED_APP}/web/assets ${RED_APP}/web/images/avatars \ && chown www-data ${RED_APP}/runtime ${RED_APP}/web/uploads \ && chmod a+rwx ${RED_APP}/web/uploads \