Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
node_modules
npm-debug.log
.nyc_output
coverage
.git
.gitignore
README.md
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.DS_Store
Dockerfile
.dockerignore
docker-compose*.yml
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Base build stage
FROM node:22-alpine AS builder

WORKDIR /app

# Install dependencies
COPY package*.json ./
RUN npm install --only=production

# Copy source
COPY . .

# Runtime stage
FROM node:22-alpine

WORKDIR /app

# Copy only built output + dependencies
COPY --from=builder /app /app

# Run as non-root user for security
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser

EXPOSE 3000

# Run in production mode
ENV NODE_ENV=production

CMD ["npm", "run", "start"]
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,28 @@ npm run dev

---

## Running with Docker

Run Eremos inside Docker, without installing Node.js locally.

Build the image:

```bash
docker build -t eremos-core .
```

Run the container:

```bash
docker run --rm -it -p 3000:3000 eremos-core
```

Using Docker Compose:

```bash
docker compose up
```

## Key Folders

- `/agents` - Agent templates + logic
Expand Down
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: "3.9"

services:
eremos-core:
build:
context: .
dockerfile: Dockerfile
container_name: eremos-core
restart: unless-stopped # auto-restart if crash or system reboot
ports:
- "3000:3000" # host:container
env_file:
- .env.local # keep secrets outside the compose file
environment:
NODE_ENV: production
volumes:
- /app/node_modules # avoid mounting host node_modules
command: npm run start # run optimized build, not dev server