Skip to content

Commit 1b45195

Browse files
Sunwood-ai-labslxowalle
authored andcommitted
feat: add Docker Compose support for Discord bot deployment
- Add Dockerfile with multi-stage build for picoclaw - Add docker-compose.discord.yml for Discord bot service - Add docker-compose.yml for agent mode service - Add .env.example with environment variable template - Add .dockerignore for optimized builds - Update README.md with Docker Compose section and language switch - Add README.ja.md (Japanese documentation) - Update .gitignore with Docker-related entries
1 parent d165fde commit 1b45195

File tree

8 files changed

+642
-0
lines changed

8 files changed

+642
-0
lines changed

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.git
2+
.gitignore
3+
build/
4+
.picoclaw/
5+
config/
6+
.env
7+
.env.example
8+
*.md
9+
LICENSE
10+
assets/

.env.example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ── LLM Provider ──────────────────────────
2+
# Uncomment and set the API key for your provider
3+
# OPENROUTER_API_KEY=sk-or-v1-xxx
4+
# ZHIPU_API_KEY=xxx
5+
# ANTHROPIC_API_KEY=sk-ant-xxx
6+
# OPENAI_API_KEY=sk-xxx
7+
# GEMINI_API_KEY=xxx
8+
9+
# ── Chat Channel ──────────────────────────
10+
# TELEGRAM_BOT_TOKEN=123456:ABC...
11+
# DISCORD_BOT_TOKEN=xxx
12+
13+
# ── Web Search (optional) ────────────────
14+
# BRAVE_SEARCH_API_KEY=BSA...
15+
16+
# ── Timezone ──────────────────────────────
17+
TZ=Asia/Tokyo

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Binaries
2+
# Go build artifacts
23
bin/
4+
build/
35
*.exe
46
*.dll
57
*.so
@@ -10,12 +12,20 @@ bin/
1012
/picoclaw-test
1113

1214
# Picoclaw specific
15+
16+
# PicoClaw
1317
.picoclaw/
1418
config.json
1519
sessions/
1620
build/
1721

1822
# Coverage
23+
24+
# Secrets & Config (keep templates, ignore actual secrets)
25+
.env
26+
config/config.json
27+
28+
# Test
1929
coverage.txt
2030
coverage.html
2131

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# ============================================================
2+
# Stage 1: Build the picoclaw binary
3+
# ============================================================
4+
FROM golang:1.24-alpine AS builder
5+
6+
RUN apk add --no-cache git make
7+
8+
WORKDIR /src
9+
10+
# Cache dependencies
11+
COPY go.mod go.sum ./
12+
RUN go mod download
13+
14+
# Copy source and build
15+
COPY . .
16+
RUN make build
17+
18+
# ============================================================
19+
# Stage 2: Minimal runtime image
20+
# ============================================================
21+
FROM alpine:3.21
22+
23+
RUN apk add --no-cache ca-certificates tzdata
24+
25+
# Copy binary
26+
COPY --from=builder /src/build/picoclaw /usr/local/bin/picoclaw
27+
28+
# Copy builtin skills
29+
COPY --from=builder /src/skills /opt/picoclaw/skills
30+
31+
# Create picoclaw home directory
32+
RUN mkdir -p /root/.picoclaw/workspace/skills && \
33+
cp -r /opt/picoclaw/skills/* /root/.picoclaw/workspace/skills/ 2>/dev/null || true
34+
35+
ENTRYPOINT ["picoclaw"]
36+
CMD ["gateway"]

0 commit comments

Comments
 (0)