mirror of
https://github.com/stoatchat/self-hosted.git
synced 2026-03-19 17:25:17 -05:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82913d7f83 | |||
| 6d6a3cceb6 | |||
| 3f716efe70 | |||
| 5b753f6762 | |||
| 97367d1f41 | |||
| bd52dc4688 | |||
| 0992048935 | |||
| e21d86d3fa | |||
| cbff098301 | |||
| eb7787a851 | |||
| c01603c51a | |||
| d241581856 | |||
| ddcf2b3634 | |||
| bd354e4e29 | |||
| 490ff5686a |
6
.env
Normal file
6
.env
Normal file
@@ -0,0 +1,6 @@
|
||||
HOSTNAME=https://chat.kofal.net
|
||||
REVOLT_PUBLIC_URL=https://chat.kofal.net/api
|
||||
VITE_API_URL=https://chat.kofal.net/api
|
||||
VITE_WS_URL=wss://chat.kofal.net/ws
|
||||
VITE_MEDIA_URL=https://chat.kofal.net/autumn
|
||||
VITE_PROXY_URL=https://chat.kofal.net/january
|
||||
6
.env.web
Normal file
6
.env.web
Normal file
@@ -0,0 +1,6 @@
|
||||
HOSTNAME=:80
|
||||
REVOLT_PUBLIC_URL=https://chat.kofal.net/api
|
||||
VITE_API_URL=https://chat.kofal.net/api
|
||||
VITE_WS_URL=wss://chat.kofal.net/ws
|
||||
VITE_MEDIA_URL=https://chat.kofal.net/autumn
|
||||
VITE_PROXY_URL=https://chat.kofal.net/january
|
||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,9 +1,9 @@
|
||||
data*
|
||||
|
||||
.env
|
||||
.env.web
|
||||
Revolt.toml
|
||||
livekit.yml
|
||||
#.env
|
||||
#.env.web
|
||||
#Revolt.toml
|
||||
#livekit.yml
|
||||
Revolt.toml.old
|
||||
livekit.yml.old
|
||||
|
||||
|
||||
23
Revolt.toml
Normal file
23
Revolt.toml
Normal file
@@ -0,0 +1,23 @@
|
||||
[hosts]
|
||||
app = "https://chat.kofal.net"
|
||||
api = "https://chat.kofal.net/api"
|
||||
events = "wss://chat.kofal.net/ws"
|
||||
autumn = "https://chat.kofal.net/autumn"
|
||||
january = "https://chat.kofal.net/january"
|
||||
|
||||
[hosts.livekit]
|
||||
worldwide = "wss://chat.kofal.net/livekit"
|
||||
|
||||
[pushd.vapid]
|
||||
private_key = "LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSUVEQmZCeDl6WitaQlVoZzI3TjNHM1REQ2xzM084Qkk0K2lrT1A5cXJ2UmlvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFamUrMU92YjUrYkwzS3BtOXJ2cWhxbTNtMHlMa1g2dDhiTGVDVW9pQ044Wmp0ZjRTNmJRRgptYVhiWUVHQWVDTEphdmxVdUh3SVZpZWFmSjJFVEFTNnd3PT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo"
|
||||
public_key = "BI3vtTr2-fmy9yqZva76oapt5tMi5F-rfGy3glKIgjfGY7X-Eum0BZml22BBgHgiyWr5VLh8CFYnmnydhEwEusM"
|
||||
|
||||
[files]
|
||||
encryption_key = "KcOMrR6lTE5wcHvL3z7aB/0tj2+4rJD2KNDnB/tjp3I="
|
||||
|
||||
[api.livekit.nodes.worldwide]
|
||||
url = "http://livekit:7880"
|
||||
lat = 0.0
|
||||
lon = 0.0
|
||||
key = "317d0847b3a2"
|
||||
secret = "5a25b201ae80573c064e01b7387e7ac6fa99b0039a128dff"
|
||||
221
docker-compose.yml
Normal file
221
docker-compose.yml
Normal file
@@ -0,0 +1,221 @@
|
||||
name: stoat
|
||||
|
||||
services:
|
||||
# MongoDB: Database
|
||||
database:
|
||||
image: docker.io/mongo
|
||||
restart: always
|
||||
environment: &env
|
||||
- HOSTNAME=https://chat.kofal.net
|
||||
- REVOLT_PUBLIC_URL=https://chat.kofal.net/api
|
||||
- VITE_API_URL=https://chat.kofal.net/api
|
||||
- VITE_WS_URL=wss://chat.kofal.net/ws
|
||||
- VITE_MEDIA_URL=https://chat.kofal.net/autumn
|
||||
- VITE_PROXY_URL=https://chat.kofal.net/january
|
||||
volumes:
|
||||
- ./data/db:/data/db
|
||||
healthcheck:
|
||||
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
# Redis: Event message broker & KV store
|
||||
redis:
|
||||
image: docker.io/eqalpha/keydb
|
||||
restart: always
|
||||
|
||||
# RabbitMQ: Internal message broker
|
||||
rabbit:
|
||||
image: docker.io/rabbitmq:4
|
||||
restart: always
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: rabbituser
|
||||
RABBITMQ_DEFAULT_PASS: rabbitpass
|
||||
volumes:
|
||||
- ./data/rabbit:/var/lib/rabbitmq
|
||||
healthcheck:
|
||||
test: rabbitmq-diagnostics -q ping
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
|
||||
# MinIO: S3-compatible storage server
|
||||
minio:
|
||||
image: docker.io/minio/minio
|
||||
command: server /data
|
||||
volumes:
|
||||
- ./data/minio:/data
|
||||
environment:
|
||||
MINIO_ROOT_USER: minioautumn
|
||||
MINIO_ROOT_PASSWORD: minioautumn
|
||||
MINIO_DOMAIN: minio
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- revolt-uploads.minio
|
||||
# legacy support:
|
||||
- attachments.minio
|
||||
- avatars.minio
|
||||
- backgrounds.minio
|
||||
- icons.minio
|
||||
- banners.minio
|
||||
- emojis.minio
|
||||
restart: always
|
||||
|
||||
# Caddy: Web server
|
||||
caddy:
|
||||
image: docker.io/caddy
|
||||
restart: always
|
||||
environment: *env
|
||||
ports:
|
||||
- "8880:80"
|
||||
- "8443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- ./data/caddy-data:/data
|
||||
- ./data/caddy-config:/config
|
||||
|
||||
# API server
|
||||
api:
|
||||
image: ghcr.io/stoatchat/api:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
rabbit:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Events service
|
||||
events:
|
||||
image: ghcr.io/stoatchat/events:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# File server
|
||||
autumn:
|
||||
image: ghcr.io/stoatchat/file-server:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
createbuckets:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Metadata and image proxy
|
||||
january:
|
||||
image: ghcr.io/stoatchat/proxy:v0.11.1
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Tenor proxy
|
||||
gifbox:
|
||||
image: ghcr.io/stoatchat/gifbox:v0.11.1
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Regular task daemon
|
||||
crond:
|
||||
image: ghcr.io/stoatchat/crond:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Push notification daemon
|
||||
pushd:
|
||||
image: ghcr.io/stoatchat/pushd:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
rabbit:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Voice ingress daemon
|
||||
voice-ingress:
|
||||
image: ghcr.io/stoatchat/voice-ingress:v0.11.1
|
||||
restart: always
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
rabbit:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
|
||||
livekit:
|
||||
image: ghcr.io/stoatchat/livekit-server:v1.9.6
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_started
|
||||
command: --config /etc/livekit.yml
|
||||
ports:
|
||||
- "7881:7881"
|
||||
- "50000-50100:50000-50100/udp"
|
||||
restart: always
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./livekit.yml
|
||||
target: /etc/livekit.yml
|
||||
|
||||
# Create buckets for minio.
|
||||
createbuckets:
|
||||
image: docker.io/minio/mc
|
||||
depends_on:
|
||||
- minio
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
while ! /usr/bin/mc ready minio; do
|
||||
/usr/bin/mc alias set minio http://minio:9000 minioautumn minioautumn;
|
||||
echo 'Waiting minio...' && sleep 1;
|
||||
done;
|
||||
/usr/bin/mc mb minio/revolt-uploads;
|
||||
exit 0;
|
||||
"
|
||||
|
||||
# Web App
|
||||
web:
|
||||
image: ghcr.io/stoatchat/for-web:addb6b7
|
||||
restart: always
|
||||
environment: *env
|
||||
214
docker-compose2.yml
Normal file
214
docker-compose2.yml
Normal file
@@ -0,0 +1,214 @@
|
||||
name: stoat
|
||||
|
||||
services:
|
||||
# MongoDB: Database
|
||||
database:
|
||||
image: docker.io/mongo
|
||||
restart: always
|
||||
volumes:
|
||||
- ./data/db:/data/db
|
||||
healthcheck:
|
||||
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
# Redis: Event message broker & KV store
|
||||
redis:
|
||||
image: docker.io/eqalpha/keydb
|
||||
restart: always
|
||||
|
||||
# RabbitMQ: Internal message broker
|
||||
rabbit:
|
||||
image: docker.io/rabbitmq:4
|
||||
restart: always
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: rabbituser
|
||||
RABBITMQ_DEFAULT_PASS: rabbitpass
|
||||
volumes:
|
||||
- ./data/rabbit:/var/lib/rabbitmq
|
||||
healthcheck:
|
||||
test: rabbitmq-diagnostics -q ping
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
|
||||
# MinIO: S3-compatible storage server
|
||||
minio:
|
||||
image: docker.io/minio/minio
|
||||
command: server /data
|
||||
volumes:
|
||||
- ./data/minio:/data
|
||||
environment:
|
||||
MINIO_ROOT_USER: minioautumn
|
||||
MINIO_ROOT_PASSWORD: minioautumn
|
||||
MINIO_DOMAIN: minio
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- revolt-uploads.minio
|
||||
# legacy support:
|
||||
- attachments.minio
|
||||
- avatars.minio
|
||||
- backgrounds.minio
|
||||
- icons.minio
|
||||
- banners.minio
|
||||
- emojis.minio
|
||||
restart: always
|
||||
|
||||
# Caddy: Web server
|
||||
caddy:
|
||||
image: docker.io/caddy
|
||||
restart: always
|
||||
env_file: .env.web
|
||||
ports:
|
||||
- "8880:80"
|
||||
#- "8443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- ./data/caddy-data:/data
|
||||
- ./data/caddy-config:/config
|
||||
|
||||
# API server
|
||||
api:
|
||||
image: ghcr.io/stoatchat/api:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
rabbit:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Events service
|
||||
events:
|
||||
image: ghcr.io/stoatchat/events:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# File server
|
||||
autumn:
|
||||
image: ghcr.io/stoatchat/file-server:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
createbuckets:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Metadata and image proxy
|
||||
january:
|
||||
image: ghcr.io/stoatchat/proxy:v0.11.1
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Tenor proxy
|
||||
gifbox:
|
||||
image: ghcr.io/stoatchat/gifbox:v0.11.1
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Regular task daemon
|
||||
crond:
|
||||
image: ghcr.io/stoatchat/crond:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Push notification daemon
|
||||
pushd:
|
||||
image: ghcr.io/stoatchat/pushd:v0.11.1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
rabbit:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
restart: always
|
||||
|
||||
# Voice ingress daemon
|
||||
voice-ingress:
|
||||
image: ghcr.io/stoatchat/voice-ingress:v0.11.1
|
||||
restart: always
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
rabbit:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./Revolt.toml
|
||||
target: /Revolt.toml
|
||||
|
||||
livekit:
|
||||
image: ghcr.io/stoatchat/livekit-server:v1.9.6
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_started
|
||||
command: --config /etc/livekit.yml
|
||||
ports:
|
||||
- "7881:7881"
|
||||
- "50000-50100:50000-50100/udp"
|
||||
restart: always
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./livekit.yml
|
||||
target: /etc/livekit.yml
|
||||
|
||||
# Create buckets for minio.
|
||||
createbuckets:
|
||||
image: docker.io/minio/mc
|
||||
depends_on:
|
||||
- minio
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
while ! /usr/bin/mc ready minio; do
|
||||
/usr/bin/mc alias set minio http://minio:9000 minioautumn minioautumn;
|
||||
echo 'Waiting minio...' && sleep 1;
|
||||
done;
|
||||
/usr/bin/mc mb minio/revolt-uploads;
|
||||
exit 0;
|
||||
"
|
||||
|
||||
# Web App
|
||||
web:
|
||||
image: ghcr.io/stoatchat/for-web:addb6b7
|
||||
restart: always
|
||||
env_file: .env.web
|
||||
19
livekit.yml
Normal file
19
livekit.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
rtc:
|
||||
use_external_ip: true
|
||||
port_range_start: 50000
|
||||
port_range_end: 50100
|
||||
tcp_port: 7881
|
||||
|
||||
redis:
|
||||
address: redis:6379
|
||||
|
||||
turn:
|
||||
enabled: false
|
||||
|
||||
keys:
|
||||
317d0847b3a2: 5a25b201ae80573c064e01b7387e7ac6fa99b0039a128dff
|
||||
|
||||
webhook:
|
||||
api_key: 317d0847b3a2
|
||||
urls:
|
||||
- "http://voice-ingress:8500/worldwide"
|
||||
Reference in New Issue
Block a user