From f6b66ec71953ef1866001483eaad37e4adde6faf Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Tue, 27 Sep 2022 20:07:41 +0200 Subject: [PATCH 1/3] Add Github action --- README.md | 13 ++++++++++- workflows/build.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 workflows/build.yml diff --git a/README.md b/README.md index 8a27a2e..5347edb 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,11 @@ # Laravel PHP-FPM Docker image -> 🐳 Docker image for a PHP-FPM container crafted to run Laravel or any php based applications. +> 🐳 Full Docker image for a PHP-FPM container created to run Laravel or any PHP based applications. - [Docker Hub](https://hub.docker.com/r/jkaninda/laravel-php-fpm) +- [Github](https://github.com/jkaninda/laravel-php-fpm) + ## Specifications: @@ -16,6 +18,8 @@ * OpenSSL PHP Extension * XML PHP Extension * PDO PHP Extension +* PDO Mysql +* PDO Pgsql * Rdkafka PHP Extension * Redis PHP Extension * Mbstring PHP Extension @@ -171,6 +175,13 @@ volumes: ### Custom php.ini > /var/www/html/conf/php/php.ini +### Storage permision issue +> docker-compose exec php-fpm /bin/bash + +> chown -R www-data:www-data /var/www/html/storage + +> chmod -R 775 /var/www/html/storage + > P.S. please give a star if you like it :wink: diff --git a/workflows/build.yml b/workflows/build.yml new file mode 100644 index 0000000..562f83d --- /dev/null +++ b/workflows/build.yml @@ -0,0 +1,54 @@ +name: ci + +on: + push: + branches: + - 'master' + - '8.1' + - '8.0' + - '7.4' + - '7.2' + pull_request: + branches: + - 'master' + - '8.1' + - '8.0' + - '7.4' + - '7.2' + +env: + #BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BUILDKIT_IMAGE: jkaninda/laravel-php-fpm +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Set environment for branch + run: | + set -x + if [[ $GITHUB_REF == 'refs/heads/master' ]]; then + echo "TAG_NAME=latest" >> "$GITHUB_ENV" + echo "runs-on: master branch" + else + echo "TAG_NAME=${{ github.head_ref || github.ref_name }}" >> "$GITHUB_ENV" + echo "runs-on: ${{ github.head_ref || github.ref_name }} branch" + fi + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + tags: "${{env.BUILDKIT_IMAGE}}:${{env.TAG_NAME}}" \ No newline at end of file From 1af38bd2f3fe00484b61893e21229d8f98e4847b Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Tue, 27 Sep 2022 20:11:04 +0200 Subject: [PATCH 2/3] Add Github action --- {workflows => .github/workflows}/build.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {workflows => .github/workflows}/build.yml (100%) diff --git a/workflows/build.yml b/.github/workflows/build.yml similarity index 100% rename from workflows/build.yml rename to .github/workflows/build.yml From 1e89e5ebb70df195e82088cc376782b2b24ff48b Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Tue, 27 Sep 2022 20:22:58 +0200 Subject: [PATCH 3/3] Update php version to 8.1.9 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9f5a315..4965143 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1.7-fpm +FROM php:8.1.9-fpm ARG WORKDIR=/var/www/html ENV DOCUMENT_ROOT=${WORKDIR} ENV LARAVEL_PROCS_NUMBER=1