-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathcompose.yaml
More file actions
108 lines (103 loc) · 2.79 KB
/
compose.yaml
File metadata and controls
108 lines (103 loc) · 2.79 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
services:
obsidian:
build:
context: .
dockerfile: Dockerfile
container_name: obsidian-irc
ports:
- '3000:80'
restart: unless-stopped
healthcheck:
test: ['CMD', 'wget', '-qO-', 'http://localhost/']
interval: 30s
timeout: 10s
retries: 3
gen-certs:
image: alpine:3.20
volumes:
- ${MKCERT_CAROOT:?Run ./scripts/setup-dev-certs.sh first}:/caroot:ro
- ./certs:/certs
command:
- sh
- -c
- |
openssl x509 -noout -in /certs/server.pem 2>/dev/null && exit 0
apk add --no-cache openssl -q
openssl genrsa -out /certs/server-key.pem 2048
openssl req -new -key /certs/server-key.pem -out /tmp/csr.pem -subj "/CN=localhost"
printf '[SAN]\nsubjectAltName=DNS:localhost,IP:127.0.0.1,IP:::1\n' > /tmp/ext.cnf
openssl x509 -req -in /tmp/csr.pem \
-CA /caroot/rootCA.pem -CAkey /caroot/rootCA-key.pem -set_serial 1 \
-out /certs/server.pem -days 825 -sha256 -extfile /tmp/ext.cnf -extensions SAN
profiles:
- testing
# TODO - Add IRC daemon + backend etc
ircd:
init: true
# TODO: Use our unrealircd custom image instead
image: ghcr.io/ergochat/ergo:master
container_name: ergo
ports:
- '6667:6667' # plain IRC (bots)
- '6697:6697' # IRC over TLS — ircs://localhost:6697 (Tauri native TCP)
- '8097:8097' # WebSocket over TLS — wss://localhost:8097 (browser / WebView)
restart: unless-stopped
depends_on:
gen-certs:
condition: service_completed_successfully
volumes:
- ./docker/ergo.yaml:/ircd/ircd.yaml
- ./certs:/ircd/certs:ro
profiles:
- testing
echo-bot:
image: python:3.12-alpine
container_name: echo-bot
volumes:
- ./docker/echobot.py:/app/echobot.py:ro
working_dir: /app
depends_on:
- ircd
environment:
HOST: ircd
PORT: 6667
CHANNEL: '#test'
NICK: EchoBot
command: ['python', '-u', 'echobot.py']
restart: unless-stopped
profiles:
- testing
helper-bot:
image: python:3.12-alpine
container_name: helper-bot
volumes:
- ./docker/echobot.py:/app/echobot.py:ro
working_dir: /app
depends_on:
- ircd
environment:
HOST: ircd
PORT: 6667
CHANNEL: '#test'
NICK: HelperBot1
command: ['python', '-u', 'echobot.py']
restart: unless-stopped
profiles:
- testing
chat-bot:
image: python:3.12-alpine
container_name: chat-bot
volumes:
- ./docker/echobot.py:/app/echobot.py:ro
working_dir: /app
depends_on:
- ircd
environment:
HOST: ircd
PORT: 6667
CHANNEL: '#test'
NICK: HelperBot2
command: ['python', '-u', 'echobot.py']
restart: unless-stopped
profiles:
- testing