Skip to content

Commit aab0360

Browse files
Set up devcontainer with Node 24 LTS and Ona automations (#7)
- Switch Dockerfile to javascript-node:24-bookworm - Configure devcontainer with port forwarding for Astro dev server - Add automations.yaml with install-deps task and dev-server service - Fix allowedHosts placement in astro.config.mjs (move to Astro server config) Co-authored-by: Ona <no-reply@ona.com>
1 parent c279e8a commit aab0360

4 files changed

Lines changed: 36 additions & 3 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM mcr.microsoft.com/devcontainers/javascript-node:24-bookworm

.devcontainer/devcontainer.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "Agentic Engineering Guide",
3+
"build": {
4+
"context": ".",
5+
"dockerfile": "Dockerfile"
6+
},
7+
"forwardPorts": [4321],
8+
"portsAttributes": {
9+
"4321": {
10+
"label": "Astro Dev Server",
11+
"onAutoForward": "notify"
12+
}
13+
}
14+
}

.ona/automations.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
tasks:
2+
install-deps:
3+
name: Install dependencies
4+
description: Install npm dependencies for the Astro project.
5+
command: |
6+
npm ci
7+
triggeredBy:
8+
- postDevcontainerStart
9+
10+
services:
11+
dev-server:
12+
name: Dev Server
13+
description: Astro dev server with live reload.
14+
commands:
15+
start: |
16+
npm run dev -- --host 0.0.0.0 --port 4321
17+
ready: |
18+
curl -f http://localhost:4321

astro.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ export default defineConfig({
77
site: "https://agents.siddhantkhare.com",
88
base: "/",
99
integrations: [mdx(), sitemap()],
10+
server: {
11+
allowedHosts: true,
12+
},
1013
vite: {
1114
plugins: [tailwindcss()],
12-
server: {
13-
allowedHosts: true,
14-
},
1515
},
1616
markdown: {
1717
shikiConfig: {

0 commit comments

Comments
 (0)