luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.57k stars 156 forks source link

Configuring production server #1756

Open jkthorne opened 1 year ago

jkthorne commented 1 year ago

I am building a production server and setting configuration with environment variables and they do not seem to be configuring the server. I am a little confused and debugging it. Has anyone else noticed these problems?

for example I am setting the PORT environment variable and compiling src/start_server.cr on linux. The executable seems to always have the port 5000 unless I hardcode the src/server.cr file. This is very confusing and I have spent a fair bit of time debugging this.

jwoertink commented 1 year ago

Are you compiling with the LUCKY_ENV=production set? Otherwise it's gonna use DEV_PORT.