Feat: Devcontainers and better readme #3
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/devcontainers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adding @informatic and @q3k just for visibility purposes; please check if this kind of experience is good enough for you as I'd like to get it in more HSWAW repositories.
5f616b041a
to185896f4bb
185896f4bb
toe4065e7da4
@ -18,3 +18,1 @@
"ghcr.io/wxw-matt/devcontainer-features/script_runner:0": {}
}
"ghcr.io/wxw-matt/devcontainer-features/script_runner:0": {},
Is this (and sshd feature) actually used here?
sshd
is required for ssh git commit signing from dev containers if someone uses that. DX feat.This script runner - nah. Getting rid of it.
@ -36,0 +37,4 @@
"verifySignature": false
}
},
"settings.extensions.verifySignature": false,
Which one is it? Do we actually need this?
seems that it's
settings: {extensions.verifySignature}
Fixing.@ -21,0 +25,4 @@
1. Devcontainer's VSCode instance will be automatically configured with extensions to help your development process.
2. You might get a Toast telling you to re-open the directory due to Black not working properly. Do so for proper autoformatting support.
7. `manage.py migrate` will be run automatically after container creation, to make sure you have the latest migrations done on the development database without any need for interaction.
8. Run debug session with either command of "Start Debugging" (default hotkey F5), or with the Debug sidebar. ![Debug sidebar instructions](readme/debug-example.png 'Debug sidebar')
Default django launch configuration here listens on 127.0.0.1:8000 which doesn't work when running in a devcontainer. We should probably add
.vscode/launch.json
there too (note the0.0.0.0:8000
added manually)Seems I accidentally added
.vscode
to.gitignore
and it made some sense back then for me. Need to revert it, all those things are added to the vscode config. Thanks for catching that.4890db8585
to401f9c3761
@informatic check now
1d6adc9b64
to1dc6d8b76d
I'm not persuaded personally into the devcontainers workflow, but I'm willing to give it a try. It took me a while to get it to work… but it does work.
Alas,
docker compose up
(which I'd prefer, seems like one fewer abstraction layer to me) still doesn't work for me :/ Strangely,manage.py collectstatic
fails withPermissionError: [Errno 13] Permission denied: '/code/build_static/css'
@ -13,4 +13,3 @@
build_static
.venv
.vscode
a huge amount of junk under .vscode-server, .ssh, .devcontiner is created for me
I can't replicate it on my setup, can you try doing a fresh clone and show diff?
@ -13,3 +11,1 @@
docker-compose up --build
```
2. Run `docker-compose run --rm web python manage.py createsuperuser` -- now you can dev authenticate w/o SSO
1. Copy `.env.example` as `.env`
shouldn't env default to not use oauth but user+pass? Otherwise it just doesn't work without oauth being set up by the user, which isn't called out by readme
@ -21,0 +25,4 @@
1. Devcontainer's VSCode instance will be automatically configured with extensions to help your development process.
2. You might get a Toast telling you to re-open the directory due to Black not working properly. Do so for proper autoformatting support.
7. `manage.py migrate` will be run automatically after container creation, to make sure you have the latest migrations done on the development database without any need for interaction.
8. Run debug session with either command of "Start Debugging" (default hotkey F5), or with the Debug sidebar. ![Debug sidebar instructions](readme/debug-example.png 'Debug sidebar')
strangely, it told me a few times that I can't do it without a python extension multiple times (despite me having installed it) until it started working ¯_(ツ)_/¯
@ -31,0 +37,4 @@
1. Get python3
2. `pip install -r requirements.txt`
3. `python3 manage.py migrate`
4. `python3 manage.py collecstatic`
typo