-
Notifications
You must be signed in to change notification settings - Fork 2
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
support for processing / Makefile / etc #1
Comments
Hey @schollz! Thanks for the question and feedback. It's definitely in the plans to have something specifically for that. The plan would be to still rely on Docker and a Dockerfile to have all the dependencies, and then define a command that would run when deploying. Just drafting, a {
"version": "1.0",
"services": {
"web": {
"type": "static",
"publicPath": "/dist"
"buildCommand": "jekyll build",
"volumes": [{
"sourcePath": "/src",
"destinationPath": "/src"
},{
"sourcePath": "/dist",
"destinationPath": "/dist"
}]
}
}
} For now, two ways to work around the fact that it's not directly possible yet would be to build and commit to either the same repo, or a separate "deployment repo", or instead of trying to let Disco serve the static files, you could run the server in your app. For the second option, have a look at this other example (Django) that has a "pre deploy" command: https://github.com/letsdiscodev/example-django-site/blob/4028c926b9a85efd2800b9362c6d2c10c67d1ff4/disco.json#L9-L14 I'm leaving this issue open since we'll be working on this soon. |
some comparison notes below render does it like this for reference: https://docs.render.com/deploy-hugo they run a pre-installed hugo which is both convenient but not great since then the hugo version can't be controlled for instance. there's a thread on this topic here: https://community.render.com/t/how-to-define-hugo-version/390/9 (they go through the manual hugo installation steps in that thread) fly is heavier since you're defining everything with dockerfiles, and need to handle the caddy installation: https://fly.io/blog/hugo-s-there-flying-with-hugo-and-caddy/ they end up using this docker image for github pages, there's this github actions that takes care of installing hugo |
hey @schollz , @antoineleclair worked his usual magic and we now fully support static-sites-with-build-steps! hugo docs are here: https://docs.letsdisco.dev/tldr-guides/deploying-a-hugo-static-site all of the good stuff happens in that repo's disco.json -> we pull the deployments are ......... scarily fast. I'm very honestly not used to cloud deployments this fast. I recorded this video where I make a small change to the example hugo site and continuously wget+grep the site. it takes 3 seconds from git push to the site being built + made live. 3!!!. 3!!!!!!!!!!! :-) let us know what you think / if this works!! cheers
|
... and Jekyll works now too! docs: https://docs.letsdisco.dev/tldr-guides/deploying-a-jekyll-site let us know!! :-) |
I often use Hugo or Jekyll for static sites. is there a way to include a hook to tell disco to build the static site? or would the solution be to include a Dockerfile that builds the site and binds it to a volume (might be better in case of Jekyll which had dependency nightmares sometimes)?
The text was updated successfully, but these errors were encountered: