Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (71 loc) · 3.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (71 loc) · 3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Mimir on your own server. On any machine with Docker, in an empty folder:
# curl -fsSLO https://heymimir.app/docker-compose.yml
# echo "MIMIR_COMPUTER_TOKEN=$(openssl rand -hex 24)" > .env
# docker compose up -d
# docker compose exec mimir mimir admin-token # sign in to the web app with this
# Update: docker compose pull && docker compose up -d. In a clone of the source, `docker compose up -d --build` builds
# the image yourself instead. Step by step: https://heymimir.app/docs/self-hosting/
services:
mimir:
image: ghcr.io/currentbits/mimir:${MIMIR_VERSION:-latest}
build: .
restart: unless-stopped
volumes:
- mimir-data:/data
ports:
- "127.0.0.1:8080:8080" # keep it local; expose through the TLS proxy below
# It needs no Linux capabilities and never gains privileges (it already runs as an unprivileged user).
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
environment:
# The bots' computer runs in the service below, away from your data.
MIMIR_COMPUTER: computer:7300
MIMIR_COMPUTER_TOKEN: ${MIMIR_COMPUTER_TOKEN:?put MIMIR_COMPUTER_TOKEN in .env (see the top of this file)}
# MIMIR_ADMIN_TOKEN: <24+ characters> # else one is generated on first run (openssl rand -hex 24)
# CLAUDE_CODE_OAUTH_TOKEN: ... # from `claude setup-token` on any machine
# MIMIR_SIGNAL_API: http://signal:8080 # with the signal service below
depends_on: [computer]
# networks: [default, signal] # with the signal service below
# The bots' computer (screen + Chromium). Its own user and no /data: a browser exploit from a page a bot visits
# lands somewhere without your database, secrets or the AI logins. Mimir reaches it on this compose network only
# (control on 7300 with the token, Chromium's DevTools on 9223); no ports are published.
computer:
image: ghcr.io/currentbits/mimir:${MIMIR_VERSION:-latest}
build: .
restart: unless-stopped
user: computer
command: ["mimir", "computer", "--listen", "0.0.0.0:7300"]
environment:
HOME: /home/computer
MIMIR_COMPUTER_TOKEN: ${MIMIR_COMPUTER_TOKEN:?put MIMIR_COMPUTER_TOKEN in .env (see the top of this file)}
# The image declares /data a volume; an empty tmpfs keeps it from becoming one here.
tmpfs: [/data]
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
healthcheck:
disable: true
# Optional Signal for the bots (https://heymimir.app/docs/connect/#signal): uncomment this, signal-data and the
# signal network below, and MIMIR_SIGNAL_API and networks under mimir. Link the bot's number once through an SSH
# tunnel to port 8081: http://127.0.0.1:8081/v1/qrcodelink?device_name=mimir
# It has no sign-in of its own (anyone who reaches it can send as the bot or link another device), so it's on a
# network of its own with Mimir: the computer, whose browser opens any page a bot visits, can't reach it.
# signal:
# image: bbernhard/signal-cli-rest-api:0.101@sha256:2cf09d66a86fdd210e42ee91662216364acc27da1163a8c44167a77ea3a6559a
# restart: unless-stopped
# environment: {MODE: json-rpc}
# ports: ["127.0.0.1:8081:8080"] # for linking the number only: comment out again once it's linked
# volumes: [signal-data:/home/.local/share/signal-cli]
# networks: [signal]
# Optional HTTPS with automatic certificates. Point a DNS name at this host and set it below.
# caddy:
# image: caddy:2
# restart: unless-stopped
# ports: ["80:80", "443:443"]
# command: caddy reverse-proxy --from bots.example.com --to mimir:8080
# volumes: [caddy-data:/data]
volumes:
mimir-data:
# signal-data:
# caddy-data:
# networks:
# signal: