diff --git a/.gitea/workflows/update_phar.yml b/.gitea/workflows/update_phar.yml deleted file mode 100644 index 80f55c0..0000000 --- a/.gitea/workflows/update_phar.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Update AWS SDK PHAR - -on: - workflow_dispatch: - schedule: - - cron: '34 3 * * *' # 03:34 UTC == 00:34 BRT - -permissions: - contents: write - -jobs: - download-aws-sdk: - runs-on: ubuntu-latest - container: - image: catthehacker/ubuntu:act-latest - permissions: - contents: write - actions: write # needed to dispatch another workflow - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Download AWS SDK PHAR - run: | - mkdir -p vendor - wget https://github.com/aws/aws-sdk-php/releases/latest/download/aws.phar -O vendor/aws.phar - - - name: Commit and push changes - id: commit_step - run: | - git config --global --add safe.directory '*' - git config user.name "Gitea Actions" - git config user.email "actions@git.icc.gg" - git add vendor/aws.phar - - # If there are changes, commit & push; set output flag accordingly - if git diff --quiet && git diff --staged --quiet; then - echo "No changes to commit" - echo "changes_committed=false" >> $GITHUB_OUTPUT - else - git commit -m "Update AWS SDK PHAR [▶️]" - git push origin HEAD:main - echo "changes_committed=true" >> $GITHUB_OUTPUT - fi diff --git a/Dockerfile b/Dockerfile index b0b4266..a91e927 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ COPY composer.json composer.json # COPY composer.lock composer.lock # No lock file yet COPY auth_keycloak.php auth_keycloak.php COPY s3_client.php s3_client.php -RUN composer install --no-dev --ignore-platform-reqs --no-scripts --prefer-dist +RUN export COMPOSER_PROCESS_TIMEOUT=2000 && composer install --no-dev --ignore-platform-reqs --no-scripts --prefer-dist # Stage 2: Final image FROM php:8.4-fpm-alpine @@ -17,7 +17,7 @@ RUN apk add --no-cache --update nginx \ # Copy dependencies from vendor stage COPY --from=vendor /app/vendor /var/www/html/vendor # Copy aws.phar -COPY vendor/aws.phar /var/www/html/vendor/aws.phar +# aws.phar is now installed via composer # Copy application code COPY . /var/www/html/ diff --git a/composer.json b/composer.json index 656ee2b..7ad72e9 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,8 @@ "php": "^8.2", "ext-pdo": "*", "ext-curl": "*", - "ext-json": "*" + "ext-json": "*", + "aws/aws-sdk-php": "^3.0" }, "autoload": { "classmap": [ diff --git a/config.php b/config.php index cd68286..6246128 100644 --- a/config.php +++ b/config.php @@ -1,7 +1,7 @@