-
Notifications
You must be signed in to change notification settings - Fork 29
Added guide for Deploying Lucky app with Docker #99
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I like the intro, I think this will benefit the guides!
|
||
### `LUCKY_ENV` | ||
|
||
Lucky needs a couple of environment variables to operate as a production app. The first is the `LUCKY_ENV`. We'll set it to `production`. This will signal to Lucky that it should, for example, display absolute timestamps in the server log, and use additional environment variables for its configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will signal to Lucky that it should, for example, display absolute timestamps in the server log,
<= I think that bit about the absolute timestamps is uninteresting to most users. Can we rather say something like This will signal to Lucky that it should, for example, use the production database
?
* Compile all assets | ||
|
||
```bash | ||
$ brunch build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be yarn prod
now
|
||
## FAQ | ||
|
||
### Help! I can't stop the running application with `CTRL+C` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might be resolved already? https://github.com/luckyframework/lucky_cli/blob/master/src/web_app_skeleton/src/server.cr
Thanks for writing this @nicbet and thanks for taking a look @hanneskaeufler. I don't have much experience with Docker so I appreciate your input. |
FROM crystallang/crystal:latest | ||
|
||
COPY ./ /opt/crystal | ||
RUN crystal build --no-debug -o /opt/crystal/server /opt/crystal/src/server.cr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could advise to use --release
here as well?
@nicbet do you think it is reasonable to assume that someone using this guide has already set up his app locally? I am asking because the
I DO think it is a good idea not to go into docker-compose (for database e.g) straight away. Maybe in a tiny section in the end? |
@hanneskaeufler you make a good point. I think the focus of the guide as on deployment via I'm okay with adding an additional section, or perhaps a separate guide. |
A guide that describes how to build a docker container image of your Lucky app for deployment. Background: https://gitter.im/luckyframework/Lobby?at=5a67a423e0141226508243c0