138 lines
4.3 KiB
YAML
Executable File
138 lines
4.3 KiB
YAML
Executable File
# {{ ansible_managed }}
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
|
|
# Gluetun is used to connect container to VPN
|
|
chat-gluetun:
|
|
image: qmcgaw/gluetun
|
|
cap_add:
|
|
- NET_ADMIN
|
|
environment:
|
|
- VPN_SERVICE_PROVIDER=custom
|
|
- VPN_TYPE=wireguard
|
|
- VPN_ENDPOINT_IP={{ proxy_server_ip }}
|
|
- VPN_ENDPOINT_PORT={{ proxy_server_vpn_port }}
|
|
- WIREGUARD_PUBLIC_KEY={{ vpn_server_pubkey }}
|
|
- WIREGUARD_PRIVATE_KEY={{ chat_service_privkey }}
|
|
- WIREGUARD_ADDRESSES=10.0.0.6/32
|
|
# WebRTC Voice ports ranging from 13000 to 13010
|
|
- FIREWALL_VPN_INPUT_PORTS=5000,8000,9000,3000,7000,8080,53244,27271,60160,6119,42599,34902,13000,13001,13002,13003,13004,13005,13006,13007,13008,13009,13010
|
|
- FIREWALL_INPUT_PORTS=5000,8000,9000,3000,7000,8080,19999,53244,27271,60160,6119,42599,34902,13000,13001,13002,13003,13004,13005,13006,13007,13008,13009,13010
|
|
- HTTP_CONTROL_SERVER_ADDRESS=:13200 # To ensure no conflicts with the API/Delta port
|
|
volumes:
|
|
# Custom IPTables forwarding rules to forward TCP(web) traffic from port 11000 to port 80
|
|
- ./post-rules.txt:/iptables/post-rules.txt
|
|
ports:
|
|
- "53244:53244" # Default/Chat APP (Internal Container Port 5000)
|
|
- "27271:27271" # API/Delta (Internal Container Port 8000)
|
|
- "60160:60160" # Websocket/Bonfire (Internal Container Port 9000)
|
|
- "6119:6119" # Autumn (Internal Container Port 3000)
|
|
- "42599:42599" # January (Internal Container Port 7000)
|
|
- "34902:34902" # Vortex (Internal Container Port 8080)
|
|
- "13000-13010:13000-13010" # Vortex WebRTC
|
|
|
|
# MongoDB database
|
|
chat-database:
|
|
network_mode: "service:chat-gluetun"
|
|
image: mongo
|
|
restart: always
|
|
volumes:
|
|
- ./data/db:/data/db
|
|
|
|
# Redis server
|
|
chat-redis:
|
|
network_mode: "service:chat-gluetun"
|
|
image: eqalpha/keydb
|
|
restart: always
|
|
|
|
# API server (delta)
|
|
chat-api:
|
|
network_mode: "service:chat-gluetun"
|
|
image: ghcr.io/revoltchat/server:master
|
|
env_file: .env
|
|
depends_on:
|
|
- chat-database
|
|
- chat-redis
|
|
restart: always
|
|
|
|
# Events service (quark)
|
|
chat-events:
|
|
network_mode: "service:chat-gluetun"
|
|
image: ghcr.io/revoltchat/bonfire:master
|
|
env_file: .env
|
|
depends_on:
|
|
- chat-database
|
|
- chat-redis
|
|
restart: always
|
|
|
|
# Web App (revite)
|
|
chat-web:
|
|
network_mode: "service:chat-gluetun"
|
|
image: ghcr.io/revoltchat/client:master
|
|
env_file: .env
|
|
restart: always
|
|
|
|
# File server (autumn)
|
|
chat-autumn:
|
|
network_mode: "service:chat-gluetun"
|
|
image: ghcr.io/revoltchat/autumn:master
|
|
env_file: .env
|
|
depends_on:
|
|
- chat-database
|
|
# - chat-createbuckets
|
|
environment:
|
|
- AUTUMN_MONGO_URI=mongodb://127.0.0.1
|
|
# Using bind mounts/local storage instead of storage server
|
|
volumes:
|
|
- ./data/files:/data
|
|
restart: always
|
|
|
|
# Metadata and image proxy (january)
|
|
chat-january:
|
|
network_mode: "service:chat-gluetun"
|
|
image: ghcr.io/revoltchat/january:master
|
|
restart: always
|
|
|
|
# Voice service (vortex)
|
|
chat-vortex:
|
|
network_mode: "service:chat-gluetun"
|
|
image: ghcr.io/revoltchat/vortex:0.3.0-alpha.1
|
|
env_file: .env
|
|
depends_on:
|
|
- chat-api
|
|
restart: always
|
|
|
|
# Shall use local files for autumn file server instead
|
|
# # S3-compatible storage server
|
|
# chat-minio:
|
|
# network_mode: "service:chat-gluetun"
|
|
# image: minio/minio
|
|
# command: server --address ":19999" --console-address ":19998" /data
|
|
# env_file: .env
|
|
# volumes:
|
|
# - ./data/minio:/data
|
|
# restart: always
|
|
|
|
# # Create buckets for minio.
|
|
# chat-createbuckets:
|
|
# network_mode: "service:chat-gluetun"
|
|
# image: minio/mc
|
|
# depends_on:
|
|
# - chat-minio
|
|
# env_file: .env
|
|
# entrypoint: >
|
|
# /bin/sh -c "
|
|
# while ! curl -s --output /dev/null --connect-timeout 1 http://127.0.0.1:19999; do echo 'Waiting minio...' && sleep 0.1; done;
|
|
# /usr/bin/mc alias set minio http://127.0.0.1:19999 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD;
|
|
# /usr/bin/mc mb minio/attachments;
|
|
# /usr/bin/mc mb minio/avatars;
|
|
# /usr/bin/mc mb minio/backgrounds;
|
|
# /usr/bin/mc mb minio/icons;
|
|
# /usr/bin/mc mb minio/banners;
|
|
# /usr/bin/mc mb minio/emojis;
|
|
# exit 0;
|
|
# "
|
|
|