Skip to content

Generate Dockerfile#219

Draft
oliverbarnes wants to merge 8 commits intomainmatter:mainfrom
oliverbarnes:generate-dockerfile
Draft

Generate Dockerfile#219
oliverbarnes wants to merge 8 commits intomainmatter:mainfrom
oliverbarnes:generate-dockerfile

Conversation

@oliverbarnes
Copy link
Contributor

@oliverbarnes oliverbarnes commented Mar 20, 2025

Adds a Dockerfile template based on the one we're using on mainmatter/restations, and updates the README.

@marcoow would it make sense to have a smoke test at the Gerust level? And perhaps a smoke test template as well for the blueprint, so the generated app would have it baked in (perhaps with the step commented out in the CI workflow)?

I'd add a health check endpoint so we can hit it from the smoke test.

Closes #216

@marcoow
Copy link
Member

marcoow commented Mar 31, 2025

Yes, there should be a smoke-test as well – I'd just create one for each of the 3 project types (minimal, standard, full – see existing GitHub Actions config), build the image for a freshly generated project and validate the app starts up in the container

Comment on lines +42 to +49
ENV RUST_BACKTRACE=1
# We don't want `anyhow` to capture backtraces for
# "routine" errors. Just panics.
ENV RUST_LIB_BACKTRACE=0

ENV APP_ENVIRONMENT=production
ENV APP_SERVER__PORT=3000
ENV APP_SERVER__IP="0.0.0.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These ENVs ideally aren't defined here.
APP_SERVER ones especiialy, they should be set by the config crate directly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we actually have an open issue for that on restations too. Do you feel it's a must for this PR, or can it be done in a separate one?

@oliverbarnes oliverbarnes marked this pull request as ready for review March 31, 2025 19:18
@oliverbarnes oliverbarnes marked this pull request as draft March 31, 2025 19:20
@marcoow marcoow force-pushed the main branch 10 times, most recently from 2ba0a72 to 436bdf9 Compare August 16, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Dockerfile template to blueprint

3 participants