-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instructions don't say to include .env
file in package includes
#86
Comments
Now worked out why my migrations aren't migrating - the database directory isn't in the list of includes either :-) (for anyone else following along at home, I also needed to set |
Is this for Symfony? Laravel? Please send a pull request to improve the documentation :) |
Sorry, this is for Laravel - missed out that important point! I'll try to create a pull request for you. Thanks |
OK that's interesting because I setup a Laravel app last week and had no issue. Did you add these hooks as mentionned in the docs: hooks:
build:
# Use the `.env.production` file as `.env`
- 'rm .env && cp .env.production .env'
- 'rm bootstrap/cache/*.php'
- 'php artisan config:cache' The And did you set the environment to
Ah right we had to set those in the config.
Right, this should be an easy fix in the docs
Ah this is a pain, this is because of UTF-8 support, but it's not specific to RDS/Bref. |
(I'm using Laravel v5.7.13, btw) yep, looking in yep, had it set as production in the With the I've not put any (significant) custom code into my Laravel yet (still working on getting Nova working with assets under Once I've sorted out my current nova issues, I'll try again and see if I can be more specific as to why the (Although might just give up and use a domain so I can have everything served off the root anyway, which should allow it to work out of the box, I'm guessing). |
Yes it gets really easier when you have a domain, I really hate that I guess we could also deploy |
I have two issues with nova at present (with a domain) - feel free to tell me to create a new ticket or to read the docs, if the info is there, but... I have to include the public folder (and also manually copy in the public/vendor) folder before deployment in order for nova to get to display its view (as it looks for the mix manifest file in the directory to get that far. I'm wondering why the vendor directory in the public folder isn't copied in when I use the include string Now I do appreciate that this is probably the wrong way to get the nova css to actually serve - as it is served as |
Oh *** your issue with the Now yes you probably don't want to serve assets from PHP/your lambda. The best course of action is deploying it on a CDN, the easiest being AWS S3. Then you have 2 options:
I did the second option once for my blog (Symfony app, see here the CloudFormation config: https://github.com/mnapoli/mnapoli.github.io/blob/master/serverless.yml#L45) and it really sucks. I want to make it easier in the future to deploy websites, but for now I haven't had time to write a guide about it neither write tools, I can't commit but hopefully in the next months I should be able to work on those problems. So to be honest, deploying Nova on AWS lambda is (IMO) quite a feat. You seem to get close to the end though, I'm curious you may actually make it ^^ Deploying APIs or workers (or smaller websites) is definitely easier. Hopefully this won't discourage you with lambda's altogether ;) |
I was hoping I could serve from the lambda and cache via CloudFront on the API Gateway - should be very trivial to configure (in principle). I'm tempted to try intercept the request and fix up the content type (and hack copying of the public vendor directory) - unless you think that's a terrible idea :-) Nah, I'm having fun - I'm learning a lot about Nova et al. by trying this. |
Actually, deploying the assets to s3 as part of the build process could be quite nice - my biggest concern is synchronising the code and asset deployments - I guess the best way would be to version them (by using different paths, rather than file versions, I mean) in s3 and the new code would have baked in a version in the paths requested. Yep, that does sound quite fun :-) |
My plan is to use the lambda version for the development, then Fargate for stage/prod and lambdas for the workers. Trying to make it very trivial to experiment whilst costing very little with little admin. |
I want to try that out too out of curiosity. First requests wouldn't be great though so if you deploy often that's not really good.
Yes that's a good idea |
S3 actually isn't very speedy (although would be quicker than code), and actually fails much more often than one would like! On balance though, it is probably a good idea :-) |
Oh really, I had no idea! Now I got something else to dig into ^^ |
when doing millions of requests you see a fair number of errors and they tend to group together, presumably when overloaded or doing upgrades. Having a CDN on top of it (with non-caching of errors) works well. On the upside, got 'public' assets serving through Bref fine. Nova be pretty now. Now just the 419 return code to sort out :-) |
Cool, nova now working fine, although have temporarily stopped checking the CSRF on the nova login (as the sessions are lost, of course). So, next step is to add an external session service possibly moving it into the DB (or cookie perhaps) and then cleaning up some of my hacks (force copying of the |
This was a stupid mistake by me, trying to determine whether running in bref through the environment. |
Spent ages debugging the errors that happened because the
.env
file wasn't included (gets an error with the DebugServer, then that errors with the translation class being missing).Easy fix was to add
.env
to the list of packages to include.Might also be worth mentioning that the APP_KEY and APP_URL needs to be configured.
The text was updated successfully, but these errors were encountered: