kit-clj / kit-clj.github.io

Kit documentation
https://kit-clj.github.io/
20 stars 27 forks source link

initial setup of devcontainer #48

Open jwhitlark opened 11 months ago

jwhitlark commented 11 months ago

Gives a clean-room workspace with little to no setup for experimentation.

Note that the badge Open in Codespace will need to be edited to point at the parent repository. It can always be accessed through the Code button on the github site, by selecting Codespaces instead of Local on the pop-up menu.

jwhitlark commented 11 months ago

This is ready for you to take a look at. I've not gone through the entire tutorial, but it starts, you can create the app without any other setup, jack-in (selecting the guestbook project you just created, and :dev), type (go) into the repl buffer, and it'll ask you if you want to forward the port and open it in your browser.

For people to use this with codespaces and the badge, you'll need to update the link in guestbook.md to point at the official repo instead of mine.

Take if for a spin, and let's talk how to handle docs, db, etc. I think I'd setup docker compose and have it start a real db, all setup with env vars, etc.

A couple of things I've found that are handy:

Settings sync works with this, and the cloud changes setting will transfer saved-but-uncommitted changes between locations. You can specify a dotfile repo for either codespaces or devcontainers, and have the rest of your setup at hand. There are lots of ways to handle env-vars. This all works with branches and PRs, if you want to try something specific in a clean system. If you use docker compose and add a db, you can include the vscode plugin and you're all set. Or just use the docker-outside-of-docker feature, add the docker plugin, and you can read logs, shell into things, etc. This also works with LiveShare, so someone could start a session and invite you for learning/debugging purposes.