codeXX's avatar

codeXX was awarded Best Answer+1000 XP

2mos ago

I was just playing around and fixed it.

  1. Created a new folder
  2. Cloned repos with similar folder structure
  3. Build the image again using docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build
  4. Opened the container shell docker compose -f docker-compose.yml -f docker-compose.prod.yml exec php /bin/bash
  5. switched user to www inside the container su www
  6. installed dependencies composer install
  7. configured .env
  8. restarted container php

If I have to guess, the issue was caused by the root user which is required for supervisord. This has to be separated from php-fpm container.

codeXX's avatar

codeXX wrote a reply+100 XP

2mos ago

I was just playing around and fixed it.

  1. Created a new folder
  2. Cloned repos with similar folder structure
  3. Build the image again using docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build
  4. Opened the container shell docker compose -f docker-compose.yml -f docker-compose.prod.yml exec php /bin/bash
  5. switched user to www inside the container su www
  6. installed dependencies composer install
  7. configured .env
  8. restarted container php

If I have to guess, the issue was caused by the root user which is required for supervisord. This has to be separated from php-fpm container.

codeXX's avatar

codeXX started a new conversation+100 XP

2mos ago

I have created a git repo for this setup here. The folder structure I have is:

Project Folder
|- docker-laravel
|- api

I have a docker setup with Laravel Application that works fine on local Mac however, I am facing issues with the deployment on Ubuntu server 24.0.

  1. All my paths are correct

  2. All my volumes are mapped correctly

  3. I checked the file location which exists

  4. I have correctly pointed the root for NGINX i.e. both the NGINX and PHP-FPM has the same folder structure /var/www/api/public

  5. User & Group ID matches the host OS i.e. 1000:1000 in all containers

  6. Permissions:

    1. api: 755

    2. api/storage : 775

    3. api/bootstrap/cache: 775

Has anyone faced similar issue and resolved it?

codeXX's avatar

codeXX was awarded Best Answer+1000 XP

3mos ago

Figured it out. I was using the wrong URL in the stripecli for those who encounter the same make sure you use the correct endpoint i.e. http://localhost:8080/stripe/webhook

codeXX's avatar

codeXX wrote a reply+100 XP

3mos ago

Figured it out. I was using the wrong URL in the stripecli for those who encounter the same make sure you use the correct endpoint i.e. http://localhost:8080/stripe/webhook

codeXX's avatar

codeXX started a new conversation+100 XP

3mos ago

I am trying to listen to webhook events for stripe and I am seeing 405 response in the CLI, no events triggered in the Laravel. Here is my setup:

I have added the CSRF exception in bootstrap/app

''' $middleware->validateCsrfTokens(except: [ 'stripe/*', ]); '''

I am running the stripecli from docker with host network. I added the STRIPE_WEBHOOK_SECRET and the value is from the stripecli output after running the listen command.

codeXX's avatar

codeXX wrote a reply+100 XP

4mos ago

.DS_Store was the culprit

codeXX's avatar

codeXX started a new conversation+100 XP

4mos ago

I just updated the laravel and packages using composer update and now seeing this weird response appended to each response text and in terminal after issuing php artisan vendor:publish --tag=laravel-assets --ansi --force

''' Bud1 usines @� @ @ @ 01_businessbwspblob�bplist00� ]ShowStatusBar[ShowToolbar[ShowTabView_ContainerShowSidebar\WindowBounds[ShowSidebar _{{222, 569}, {9�0, 436}} #/;R_klmno� 01_businesslsvCblobSbplist00�

WXYZ[_useRelativeDates_showIconPreviewWcolumns_calculateAllSizes_scrollPositionYXtextSize_scrollPositionXZsortColumnXiconSize_viewOptionsVersion �$(-27<@EINR

                         WvisibleUwidthYascendingZidentifier       ,Tname�widthYascendingWvisibleXubiquit�#
                                  !#        \dateModified�[dateCreated�

, Tsize� / 1 s Tkind�4 d Ulabel�9 K Wversion� ? Xcomments�B^dateLastOpened�F!YdateAdd�KZshareOwner�_shareLastEditor�_invitationStatu##@#�c�Tname#@0BJ^py���������������� %'()2356CLMNZcdfgluvxy~���������������������������

'''