-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Development/GettingStarted] Docker compose workflow #738
[Development/GettingStarted] Docker compose workflow #738
Conversation
@@ -0,0 +1,36 @@ | |||
FROM crystallang/crystal:1.1.1 |
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 needs to be updated, but later versions of the crystal dockerfile don't play well with my computer yet. If someone is willing to test this on an AMD64 architecture with this line updated to 1.3.2, I'll be happy to update it.
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.
I love the direction! I just had a few questions, but no real changes that I can see. Thanks for putting this together 🚀
# | ||
# Use this script to test if a given TCP host/port are available | ||
|
||
WAITFORIT_cmdname=${0##*/} |
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.
RUN wget https://github.com/DarthSim/overmind/releases/download/v2.2.2/overmind-v2.2.2-linux-amd64.gz && \ | ||
gunzip overmind-v2.2.2-linux-amd64.gz && \ | ||
mv overmind-v2.2.2-linux-amd64 /usr/bin/overmind && \ | ||
chmod +x /usr/bin/overmind |
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.
Should we be using Nox for this? It comes with Lucky CLI which gets installed in the next run.
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.
Yep. This provides overmind in the system, but if lucky-cli doesn't need it, it won't hurt anything. I needed this because I developed it against lucky-cli release rather than main.
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.
Ah. I forgot Nox integration hasn't been released yet. Yeah, the next release won't need a process runner!
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.
Since this will ship with Nox, when the cli is revised, I'm happy to pull it now or leave it in. I don't think it hurts and it might help someone get a compose going for an app that doesn't yet have the newest version of lucky on their system.
when the container crashes, this file doesn't get cleaned up and it won't boot again
This is a series of contributions aimed at making getting started writing a Lucky app easier.
This allows an app generated with lucky_cli to play well in a
docker compose
based development environment. There are some benefits and drawbacks to this, but primarily it means that crystal, libssl, postgres, and other libraries/tools don't need to be installed in order to get started.This does not provide a Dockerfile for production use, which would be very different from a development environment. After this is merged, I or someone else can tackle that, perhaps with a lot of inspiration from Lucky Jumpstart or my own lucky template.
In order to get started with this, a generated app need only run
docker compose up
ordocker-compose up
. It will download images, create the database, install npm modules, install shard dependencies, and even migrate the database (just on the first boot).