I did this because my Digital Ocean droplet CPU is super underpowered and running 'yarn prod' on it takes ages during which the CPU ran at 12 minutes. It started taking so long that Laravel Forge thought my deployment was hanging and killed it.
-
Pokaż ten wątek
-
W odpowiedzi do @ValCanBuild
Brilliant! Thanks for sharing Valentin, that makes me really happy to hear
Let me know if you have any questions.1 odpowiedź 0 podanych dalej 0 polubionych -
W odpowiedzi do @carre_sam
There were a few gotchas that I had to address. Like when doing the publishing in GH actions I had to remember to pass *all* the env vars I use with the MIX_ prefix. That one took me a while to figure out
1 odpowiedź 0 podanych dalej 1 polubiony -
W odpowiedzi do @ValCanBuild
Yes that’s one that I might document. Did you provide them as Repo Environment variables or hard-coded?
1 odpowiedź 0 podanych dalej 0 polubionych -
-
W odpowiedzi do @ValCanBuild
Nice, that’s what I’d recommend. I’ll do some testing locally and get an example for the read-me. We’re there any other parts that you could have been better documented?
1 odpowiedź 0 podanych dalej 1 polubiony -
W odpowiedzi do @carre_sam
One thing is that I wanted the Lasso build script to accept multiple commands. I use yarn so I wanted to do "yarn && yarn prod" but it didn't accept the &&. It's fine in my case cause I just ended up running "yarn" separately but worth mentioning.
2 odpowiedzi 0 podanych dalej 0 polubionych -
W odpowiedzi do @ValCanBuild
I found this issue too, have you tried using “||” (pipes) instead? I think that fixed it for me. Thanks for mentioning it, I might see if I can parse the && characters and get it working.
1 odpowiedź 0 podanych dalej 1 polubiony -
W odpowiedzi do @carre_sam @ValCanBuild
Actually on second thoughts, I wouldn’t recommend that. I’ve done some digging and “||” is an OR operator, and “|” uses the first command’s output as the second command’s input. I’ll do some more research on Symfony’s Process command (which is what Lasso uses)
1 odpowiedź 0 podanych dalej 1 polubiony -
W odpowiedzi do @carre_sam @ValCanBuild
Creating a custom NPM script is the right thing to do in this scenario.
1 odpowiedź 0 podanych dalej 1 polubiony
Just a custom script that combines both commands?
-
-
W odpowiedzi do @ValCanBuild
Yeah “lasso”: “yarn && yarn prod” maybe? I’m not sure if npm allows scope outside of its own commands but you can always try that
0 odpowiedzi 0 podanych dalej 1 polubionyDziękujemy. Twitter skorzysta z tych informacji, aby Twoja oś czasu bardziej Ci odpowiadała. CofnijCofnij
-
Wydaje się, że ładowanie zajmuje dużo czasu.
Twitter jest przeciążony lub wystąpił chwilowy problem. Spróbuj ponownie lub sprawdź status Twittera, aby uzyskać więcej informacji.