Skip to content

#759 - added .devcontainer for coding inside a docker-container with …#760

Open
Cyber1000 wants to merge 3 commits intochrisvel:mainfrom
Cyber1000:feature/devcontainer
Open

#759 - added .devcontainer for coding inside a docker-container with …#760
Cyber1000 wants to merge 3 commits intochrisvel:mainfrom
Cyber1000:feature/devcontainer

Conversation

@Cyber1000
Copy link
Copy Markdown

Description

I like to use vscode together with docker-container, that way you can define a dev-environment which is the same for all devs without works-on-my-machine-moments.

Type of Change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)
  • Breaking change (breaks existing functionality)
  • Documentation/Translation update
  • improved dev-infrastructure

Related Issues

Fixes #

Testing

  • Start within vscode with "Dev containers; reopen in container"
  • everything should be prepared, start with "npm run frontend:dev" and "npm run backend:dev" and test if you can login

Commands run:

  • npm run pre-push (linting + formatting + tests) -> no need, cause no code-change, but started the command
  • Tested manually in browser

Checklist

  • This is not an AI slop crap, I know what I am doing
  • Code follows project style guidelines
  • Self-reviewed my own code
  • Updated documentation (if needed)

Additional Notes

  • don't know if I should really copy .env.example to .env, cause this contains something like "TUDUDI_SESSION_SECRET=your-random-64-character-hex-string-here", maybe a own .env.development would be better for this. I've seen a .env.test, how is this used?
  • I'm running db:init and db:seed in postCreateCommand this should be a good way to go. I'm not starting frontend or backend, I think it's better to do this manually
  • I'm adding some vscode extensions within container like a sqlite-viewer and others. Maybe not complete

@Cyber1000
Copy link
Copy Markdown
Author

Maybe fixing the README (as said in #759 - I have port 3002 and not port 3001 open), should go as well into this PR.

@Cyber1000
Copy link
Copy Markdown
Author

we may also just add "npm start" at the end which seems to execute start-all-dev.sh - only "problem", no bash in docker-container, but we may change to simple sh

@jax0m
Copy link
Copy Markdown

jax0m commented Mar 27, 2026

Took in this as some inspiration for what I cooked up over in https://github.com/jax0m/tududi/tree/feature/issue-954-runtime-base-path/.devcontainer

Prebuilds out the backend/.env as well as calls the database create if not already in the files. Creates random shared secret and password if .env was created, might rearrange the shell script a bit so that it would catch if the database had to created and the .env already existed then it would apply the email/password in the .env to the new db, or if the .env had to be created and the database already existed itd apply the email/pass as well.

Anywho, also a devcontainer runner if you need someone else to test ;)

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.

2 participants