1

I have set up my project to use this package for Kubernetes/Helm on Laravel application: https://github.com/richdynamix/arc

When I run

docker-compose up

I get the real project I have been working on, but when I install Helm at tools/helm-chart folder using this command:

helm install .

I get the default laravel startup page, not the real project I have been working on.

Steps I have made:

  1. Test with docker-compose up
  2. Push to private docker repo using

    docker push myusername/reponame:latest

  3. Setup helm chart details and docker user/pass at tools/helm-chart/values.yaml

  4. Run

    helm install .

  5. Visit deployed website to see its not working properly.

I have tested this on Google Cloud and locally. Same result.

Any ideas what might be wrong here?

1 Answer 1

1

This issue is not specific to helm install.

The problem is in nginx running in the front of Laravel app, making a mess. So if you were changing server.php for your project to, let's say, run index.html instead of index.php

require_once __DIR__.'/public/index.html';

and run local server

    sukhoversha@master:~/suh$ php artisan serve
Laravel development server started: <http://127.0.0.1:8000>

this will work, because traffic hits server.php directly.

However, when you run your project with docker-compose up (even without helm), all traffic goes to nginx first, which has nginx.confwith following line:

include /etc/nginx/sites-enabled/*;

And if you check that location, you'll fine this config: default-20-rewriteapp.conf

location @rewriteapp {

    rewrite ^(.*)$ /index.php/$1 last;

}

So to fix, you can either edit index.php or edit nginx configuration

Hope this will help.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .