Skip to content
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

Improve devcontainer setup #1277

Merged
merged 3 commits into from
Jan 6, 2025
Merged

Improve devcontainer setup #1277

merged 3 commits into from
Jan 6, 2025

Conversation

medihack
Copy link
Member

@medihack medihack commented Jan 6, 2025

Improves the devcontainer setup by using a docker-compose file to spin up the database.
Maybe we can, at some point, combine both our docker-compose.yml files (maybe even the Dockerfile).

Successful PR Checklist:

  • Tests
    • (not applicable?)
  • Documentation
    • (not applicable?)

PR label(s):

Copy link

github-actions bot commented Jan 6, 2025

Coverage report

This PR does not seem to contain any modification to coverable code.

context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ../..:/workspaces:cached
Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder a bit why they mount the parent directory of the project in the template, but I kept it that way.

Copy link
Member

@ewjoachim ewjoachim left a comment

Choose a reason for hiding this comment

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

Awesome!

Wonder if it works with github.dev too.

@medihack
Copy link
Member Author

medihack commented Jan 6, 2025

Awesome!

Wonder if it works with github.dev too.

Hm, I tested it only locally and unfortunately there is an import error when I try to run the tests in Github Codespaces. I mark the PR as a draft and figure it out (why can't things just work sometimes out on their own ;-))

@medihack medihack marked this pull request as draft January 6, 2025 17:38
@medihack medihack marked this pull request as ready for review January 6, 2025 17:44
@medihack
Copy link
Member Author

medihack commented Jan 6, 2025

Ah, ignore my last message. Everything works fine in Github Codespaces, too. Just tried out the wrong branch 🙄. So, yes it works as expected.

@medihack medihack merged commit 7a48a5e into main Jan 6, 2025
11 checks passed
@medihack medihack deleted the improve-devcontainer branch January 6, 2025 17:55
@ewjoachim
Copy link
Member

Wow so that means you can get on the repo, hit ., write code, run tests and bam you've got a PR ? That's the future.

@medihack
Copy link
Member Author

medihack commented Jan 7, 2025

Wow so that means you can get on the repo, hit ., write code, run tests and bam you've got a PR ? That's the future.

Not quite. The "." (github.dev) is a completely free in-browser editor only. You can still change code, commit and push, but you can't run a devcontainer or a terminal in it.
Codespaces (which can be started via the "Code" button and there "Codespaces" tab) is a full Cloud IDE that runs on Azure. It supports a dev container and terminals. But you only get 120 CPU hours per month for free (180 as a Github Pro user), after that you have to pay hourly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR type: miscellaneous 👾 Contains misc changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants