Comments (11)
What kind of example should this be? The full Symfony demo or some more simple (custom) website using Symfony?
For the full demo website see: https://github.com/ties-v/symfony-demo-on-now and https://symfony-demo.ties.now.sh/
For a little less advanced example I would be able to put something together.
from php.
I think we should have 2 examples
- tiny minimal example ✅ (thanks @DominikVisek)
- full standard example
You can start with the minimal. What do you think?
from php.
Having issues to build a symfony app. I don't know what to do with cache on a read only file system. And after that i just get weird errors. So i am tagging along on this thread!
from php.
Hey @disjfa.
Do you have problem with this?
https://github.com/juicyfx/now-examples/tree/master/php-framework-symfony-microservice
https://now-examples-php-framework-symfony-microservice.now.sh/
from php.
I used the now files from there yes. But i started with a base symfony 5.0 checkout. So i will update when i have tested this one. If i found what and where we can update and upgrade.
from php.
Cool, the trick is to fix the cache folder in your local kernel. For reference for people who read this:
public function getCacheDir()
{
if(isset($_ENV['NOW_REGION'])){
return '/tmp/symfony/cache/'.$this->environment;
}
return parent::getCacheDir();
}
public function getLogDir()
{
if(isset($_ENV['NOW_REGION'])){
return '/tmp/symfony/log';
}
return parent::getLogDir(); // TODO: Change the autogenerated stub
}
Now the next step is to get the static css/js data from the public/build/
folder on the screen. Can't seem to get that working. Also checked a version 2 of the symfony demo on zeit but still no luck. Tried to fix the routes in the now.json
to add something like this.
{
"src": "/build/app.css",
"dest": "/public/build/app.css"
},
But no luck, if you have more tips, please. Also when i have something practical i surely will share and blg about it.
from php.
@disjfa An example for symfony 4.* is available at ties-v/symfony-demo-on-now.
The now.json file might be interesting to you.
One thing to notice is that is not using the new keys like functions
and rewrites
etc. Maybe I'll update it some time.
Hope it helps!
from php.
Yes, thats the v2 version i was talking about. I want to add some npm stuff (encore) also so that breaks there for now.
from php.
Do you have an example repo somwhere? And what is exactly failing: loading of encore assets?
from php.
Pushed my repo, just working on an example to use to prototype. https://github.com/disjfa/symfony-prototype
For now i disabled the encore files and encore build step.
from php.
There are 2 examples of symfony on vercel, take a look https://github.com/juicyfx/vercel-examples.
from php.
Related Issues (20)
- could not find driver `pgsql` HOT 3
- Unable to load dynamic library 'mongodb' and 'swoole' when deploying HOT 5
- Error: Exited with 4, Something wrong with the build process, Error: Command "vercel build" exited with 1 HOT 3
- Fatal errors not reported in vercel logs HOT 4
- mongodb module missing in 0.7.0 HOT 1
- Change / Appoint php version HOT 4
- Vercel 0.7.0 + Laravel 10 HOT 2
- the example can't run,what happened? HOT 4
- PHP Built-In Server HTTP error: Error: connect ECONNREFUSED 127.0.0.1:8000 HOT 22
- Can we support php trader
- Can we increase the **max_execution_time** and **post_max_size** here? HOT 2
- Mongo DB is not loaded and returns Class "MongoDB\Driver\Manager" not found
- error: The following Serverless Functions contain an invalid "runtime" when deploying
- Wrong Instruction in README
- Error when deploy it to Vercel "No such file or directory" HOT 5
- php: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory HOT 1
- Unable to use Sentry
- Auto-deploy production: Vite manifest not found at: /var/task/user/public/build/manifest.json
- Wordpress generate static website
- error shared libraries: libssl.so
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php.