aboutsummaryrefslogtreecommitdiffstats
path: root/.devcontainer
diff options
context:
space:
mode:
Diffstat (limited to '.devcontainer')
-rw-r--r--.devcontainer/Dockerfile7
-rw-r--r--.devcontainer/devcontainer.json55
2 files changed, 62 insertions, 0 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 0000000..111d1b9
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,7 @@
+FROM mcr.microsoft.com/devcontainers/go:1.24-bullseye
+
+# Install additional OS packages for CGO and SQLite
+RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
+ && apt-get -y install --no-install-recommends build-essential sqlite3 libsqlite3-dev
+
+# [Optional] Install Node.js is handled by features in devcontainer.json
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000..af4ea12
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,55 @@
+{
+ "name": "Neko (Podman)",
+ "build": {
+ "dockerfile": "Dockerfile",
+ "context": ".."
+ },
+ "features": {
+ "ghcr.io/devcontainers/features/node:1": {
+ "node": "20"
+ }
+ },
+ "customizations": {
+ "vscode": {
+ "settings": {
+ "go.toolsManagement.checkForUpdates": "local",
+ "go.useLanguageServer": true,
+ "go.gopath": "/go",
+ "editor.formatOnSave": true,
+ "eslint.workingDirectories": [
+ "./frontend"
+ ]
+ },
+ "extensions": [
+ "golang.Go",
+ "dbaeumer.vscode-eslint",
+ "esbenp.prettier-vscode",
+ "vitest.explorer",
+ "ms-azuretools.vscode-docker"
+ ]
+ }
+ },
+ "forwardPorts": [
+ 8080,
+ 5173
+ ],
+ "portsAttributes": {
+ "5173": {
+ "label": "Frontend (Vite)",
+ "onAutoForward": "notify"
+ },
+ "8080": {
+ "label": "Backend (Neko)",
+ "onAutoForward": "notify"
+ }
+ },
+ "postCreateCommand": "go mod download && (cd frontend && npm install)",
+ "remoteUser": "vscode",
+ "runArgs": [
+ "--security-opt",
+ "label=disable"
+ ],
+ "containerEnv": {
+ "NEKO_PORT": "8080"
+ }
+} \ No newline at end of file