jackbrycesmith / laravel-caprover-template

Template to deploy a Laravel app in docker for CapRover
MIT License
126 stars 42 forks source link

ARM support #15

Open Jimmylet opened 3 years ago

Jimmylet commented 3 years ago

Hello,

Thanks for this great guide.

When I inspect my application logs, I get this error message:

/ usr / local / bin / supervisord: line 1: syntax error: unexpected "("

It runs in a loop and it regenerates the entrypoint.sh

…
2021-04-07T13:39:55.111028320Z 🎬 start supervisord
2021-04-07T13:39:55.113866848Z /usr/local/bin/supervisord: line 1: syntax error: unexpected "("
2021-04-07T13:40:01.232137156Z 🎬 entrypoint.sh: [app] [PHP 8.0.3]
2021-04-07T13:40:01.353809899Z Generating optimized autoload files
2021-04-07T13:40:02.307670653Z > Illuminate\Foundation\ComposerScripts::postAutoloadDump
2021-04-07T13:40:02.322985510Z > @php artisan package:discover --ansi
2021-04-07T13:40:02.465557439Z Discovered Package: cviebrock/eloquent-sluggable
2021-04-07T13:40:02.465614735Z Discovered Package: fideloper/proxy
2021-04-07T13:40:02.465619075Z Discovered Package: fruitcake/laravel-cors
2021-04-07T13:40:02.465637545Z Discovered Package: intervention/image
2021-04-07T13:40:02.465643026Z Discovered Package: laravel/legacy-factories
2021-04-07T13:40:02.465646218Z Discovered Package: laravel/tinker
2021-04-07T13:40:02.465671498Z Discovered Package: mpociot/teamwork
2021-04-07T13:40:02.465692938Z Discovered Package: nesbot/carbon
2021-04-07T13:40:02.465707674Z Discovered Package: plank/laravel-mediable
2021-04-07T13:40:02.465778189Z Discovered Package: spatie/laravel-json-api-paginate
2021-04-07T13:40:02.465803534Z Discovered Package: spatie/laravel-query-builder
2021-04-07T13:40:02.465901897Z Discovered Package: tymon/jwt-auth
2021-04-07T13:40:02.465909897Z Discovered Package: vinkla/hashids
2021-04-07T13:40:02.465974323Z Package manifest generated successfully.
2021-04-07T13:40:02.475253980Z Generated optimized autoload files containing 4659 classes
2021-04-07T13:40:02.484469187Z 🎬 artisan commands
2021-04-07T13:40:02.671298620Z Nothing to migrate.
2021-04-07T13:40:02.679109450Z 🎬 start supervisord
2021-04-07T13:40:02.681900930Z /usr/local/bin/supervisord: line 1: syntax error: unexpected "("
...

Can you help me find out why it does this?

Laravel 8 and PHP 8.0.3 (server: AWS EC2 T4G)

jackbrycesmith commented 3 years ago

Hmmm strange are you using windows as your localhost dev machine? If so would be good to rule out it messing with files, e.g: https://github.com/jackbrycesmith/laravel-caprover-template/issues/12#issuecomment-735006416

Otherwise the next thing I would try is to replace all instances of %(ENV_LARAVEL_PATH)s with /srv/app/ in your /.deploy/config/supervisor.conf

Jimmylet commented 3 years ago

Hello jackbrycesmith,

Thank you for your reply.

I have deployed a new instance to Amazon EC2. I did the installation again. Everything is working now.

The only difference: I had chosen an ARM processor, can this affect the incompatibility?

However, I have read that starting with version 1.8.1., Caprover supports these processors.

It's okay, the problem is solved for me.

jackbrycesmith commented 3 years ago

Good to hear! Yeah I didn't realise but right now ARM isn't supported because of the supervisor implementation image we're pulling in doesn't have a build for it.

image

I'd expect everything to work once this is replaced. I'll wait to see if they provide newer compatible builds. You can get it working now if you build it from source in your Dockerfile. πŸ‘

Jimmylet commented 3 years ago

Thank you for your reply ! Good to know that, have a nice day! And thank you again for this template.