faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
<FromGitter> <konung> @drujensen So there is no application server like passenger or the like? You just you app "straight-up" behind nginx? Any special config on nginx?
<FromGitter> <anamba> @konung ah i missed a step. in the very simplest cases, the deploy script called by post-receive compiles the crystal app on the prod server. that's not always (or often) a good idea, since the compiler can easily eat > 1GB memory and 100% of one cpu core, so i'd recommend using some kind of CD product (for me, usually bitbucket pipelines) to do the compilation (inside a container running an OS that exactly matches
<FromGitter> ... your prod server), then scp/rsync the finished binary to the prod server.
<FromGitter> <konung> @anamba Aaron, so you do use Passenger? My Rails, Sinatra, Hanami apps ( basically anything Rack based) - I run deployed by mina to a dedicated VM that runs Nginx+Passenger. Everything is scripted via mina ( it's similar to capistrano) so I can reproduce - redeploy my apps easily enough. I'm still not sold on the virtues of Docker for smaller deployement ( it's excellent for larger deployments or reproduceble dev
<FromGitter> ... environment. But I've used Vagrant to the same effect for 8 years now without any problems. :) ) But if docker is the way to go - it's a way to go :\
<FromGitter> <anamba> so once everything is set up, my process is just `git push` to origin (bitbucket), which runs CI (`crystal spec`) and CD (compile, scp to prod, git push to prod, which runs the post-receive hook, which runs bin/deploy)
<FromGitter> <anamba> @konung yes, now that the bug i reported is fixed, i use passenger 6.0.1 for all of my crystal apps.
<FromGitter> <konung> ok. Sounds pretty straightforward
<FromGitter> <konung> Thank you!
<FromGitter> <konung> @anamba Found it https://blog.phusion.nl/2019/01/07/passenger-6-0-1-fixes-runaway-cpu/ . What's the process for setting up Crystal behind passenger like that?
<FromGitter> <anamba> i use the standalone mode with a Passengerfile.json (since i deploy a lot of small stuff, i use puppet to manage my fleet, down to the individual app level. puppet creates the Passengerfile.json)
<FromGitter> <anamba> since passenger will handle the process scaling, you can just run 1 amber process (the default is to fork off many copies)
<FromGitter> <anamba> "app_start_command": "/usr/bin/env PORT=$PORT PROCESS_COUNT=1 ./myamberapp", (for that to set the process count, have to uncomment the line that reads the env var, or configure it via the yaml config file)
<FromGitter> <konung> aha
<FromGitter> <konung> I also found this : https://www.phusionpassenger.com/docs/advanced_guides/gls/, which is what you just typed :D
<FromGitter> <Blacksmoke16> @konung its prob closer to symfony, where you have controllers to group common routes
<FromGitter> <konung> Thank you Aaron!
<FromGitter> <konung> I see Blacksmoke. Thanks I'll take a look.
<FromGitter> <Blacksmoke16> np, can checkout the docs. any questions/issue let me know
<FromGitter> <Blacksmoke16> main feature that is unique (afaik) is the param type conversion and how routes are defined by annotating methods
<FromGitter> <alex-min> Hi guys, I just have a small issue (I'm a noob at Crystal/Amber)
<FromGitter> <alex-min> I can't run the crystal spec on amber
<FromGitter> <alex-min> it just does a shards install in an infinite loop when I run it
<FromGitter> <alex-min> so you just see fetching [...] then instaling [...] then back to fetching [...] (exactly the same stuff) and so on forever
<FromGitter> <alex-min> I've ran a shards install before running the crystal spec but it does not change anything
<FromGitter> <silmanduin66> Hi there. When i do ⏎ ⏎ ``` ⏎ import Amber from 'amber'; ⏎ ⏎ let socket = new Amber.Socket('/chat'); ⏎ ``` ⏎ ⏎ I get this error : ```TypeError: amber__WEBPACK_IMPORTED_MODULE_1__.default is undefined``` does anyone have an idea where it comes from ? [https://gitter.im/amberframework/amber?at=5c64f151ecef85660ba1667c]
feepbot has quit [Ping timeout: 245 seconds]
feepbot has joined #amber
<FromGitter> <alex-lairan> Hi ! ⏎ ⏎ I have a routing problem ⏎ ⏎ This is my route : ... [https://gitter.im/amberframework/amber?at=5c659004d1e3093ab51de306]
<FromGitter> <alex-lairan> No one have an idea?
<FromGitter> <Blacksmoke16> isnt `public` used for static files?
<FromGitter> <Blacksmoke16> try using `/publicTest`?
<FromGitter> <Blacksmoke16> might be conflicting :shrug:
<FromGitter> <alex-lairan> Nothing :/ ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5c65ac1a4bafd97ca3f0c23b]
<FromGitter> <Blacksmoke16> hrm
<FromGitter> <alex-lairan> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5c65b2508328315decf4cb8a]
<FromGitter> <alex-lairan> This local work :(
<FromGitter> <Blacksmoke16> try removing the .js?
<FromGitter> <Blacksmoke16> maybe it thinks its a file and is looking for that