Skip to content

Add devcontainer#356

Merged
dbrgn merged 4 commits into
masterfrom
devcontainer
Jan 14, 2026
Merged

Add devcontainer#356
dbrgn merged 4 commits into
masterfrom
devcontainer

Conversation

@dbrgn
Copy link
Copy Markdown
Contributor

@dbrgn dbrgn commented Jan 4, 2026

This adds a devcontainer for working on this project.

Includes:

  • PostgreSQL server running locally in container
  • OpenCode
  • Non-root user and isolation options to ensure strict sandboxing

To do:

  • Port 3000 is forwarded, but when I access it I get redirected to https. Why?
  • Cache ruby gems on rebuild
  • Cache Postgres database on rebuild

@rnestler do you want to give it a try? In VS Code (the version from Microsoft, unfortunately not Code OSS) you can open the project, then it asks you whether you want to reopen the project in the dev container. Alternatively, press Ctrl+Shift+P and type "reopen in dev".

@dbrgn dbrgn requested a review from rnestler January 4, 2026 18:27
@rnestler
Copy link
Copy Markdown
Contributor

rnestler commented Jan 4, 2026

Port 3000 is forwarded, but when I access it I get redirected to https. Why?

Sounds like the app runs in production instead of development mode/config.

@dbrgn
Copy link
Copy Markdown
Contributor Author

dbrgn commented Jan 4, 2026

Port 3000 is forwarded, but when I access it I get redirected to https. Why?

Sounds like the app runs in production instead of development mode/config.

Haha, it was a different project: The gfroerli-api Docker container was already running and blocking port 3000, thus VSCode exposed it on port 3001 :D

@rnestler
Copy link
Copy Markdown
Contributor

rnestler commented Jan 6, 2026

In VS Code (the version from Microsoft, unfortunately not Code OSS) you can open the project, then it asks you whether you want to reopen the project in the dev container. Alternatively, press Ctrl+Shift+P and type "reopen in dev".

Do I need some kind of plugin? I installed visual-studio-code-bin-1.107.1-1 from the AUR.

I installed the "Dev containers" extension, but now I'm greeted with

image

Since adding a user to the docker group is basically giving root permissions without any password I'm not sure I like this...

Comment thread .devcontainer/features/postgresql/install.sh
@dbrgn
Copy link
Copy Markdown
Contributor Author

dbrgn commented Jan 7, 2026

I installed the "Dev containers" extension, but now I'm greeted with

Yes, you need the extension.

Since adding a user to the docker group is basically giving root permissions without any password I'm not sure I like this...

That's your choice, I generally allow it on my development machines. You could also try whether rootless podman works, but that has its own quirks.

Copy link
Copy Markdown
Contributor

@rnestler rnestler left a comment

Choose a reason for hiding this comment

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

I didn't test it, but I guess you can just merge it if it works for you 👍

@dbrgn dbrgn enabled auto-merge January 14, 2026 22:49
@dbrgn dbrgn merged commit 1f228b3 into master Jan 14, 2026
3 checks passed
@dbrgn dbrgn deleted the devcontainer branch January 14, 2026 22:50
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