-
Notifications
You must be signed in to change notification settings - Fork 8
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
Docker-compose and justfile #67
Conversation
Can we update the docs to include the just commands? I spent a bit trying to figure out why they didn't work anymore lol |
Ah, great call - will do! |
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.
Excellent, looks great, glad we're moving to just.
I'm actually going to cut the OpenOversight link changes off into a separate PR. We won't want to deploy that until we launch OO. |
100feb7
to
6fd7473
Compare
IS_PROD := env_var_or_default("IS_PROD", "") | ||
COMPOSE_FILE := "-f docker-compose.yml " + if IS_PROD == "true" {""} else {"-f docker-compose.override.yml "} | ||
DC := "docker-compose " + COMPOSE_FILE | ||
RUN := DC + " run --rm app" | ||
set dotenv-load := false |
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 feel like at this point just
should just have a dc
variant with all this built in 😂
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.
Seriously! I wish we could host a common justfile
somewhere and import it here so we didn't have to keep repeating ourselves. I might end up doing a repo-sync similar to some other projects where the justfile
is defined in one place and updated everywhere. I hate having to keep updating the dozen or so projects I work with!
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.
Drat lol: casey/just#906
### Build and run the app | ||
|
||
Build the image with `just build` and run it using `just up`. | ||
The server will be available at port `3030`. |
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 add a small note about how to use IS_PROD
? Is it just IS_PROD=true just up
?
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.
Great idea!
This PR prepares the project for a move from glitch onto our own infrastructure by standardizing its deployment using
just
anddocker-compose
. Fortunately this is a pretty simple app, so nothing too complex (unless we have to deal with static files, in which case I'll[REDACTED]
). I've also upgraded to Python 3.9, because Glitch was the one holding us back and I want to use the walrus operator for stuff.