Overview
FilePizza is a browser-based, peer-to-peer file sharing service deployed as part of the Mondo Open Platform Service (MOPS). It allows users to share files directly between browsers using WebRTC technology, without storing files on a central server.
Service Details
Component | Value |
---|
URL | https://pizza.trymondo.com |
Image | kern/filepizza:latest |
Container | filepizza |
Port | 3000 (internal) |
Network | traefik-net (external) |
Architecture
FilePizza consists of a single container connected to the Traefik network:
[Client Browsers] <-- WebRTC P2P --> [Client Browsers]
↑ ↑
| |
+-----------→ [FilePizza] ←---------+
↑
|
[Traefik]
FilePizza acts as a WebRTC signaling server to establish direct peer connections, but the file data transfers directly between browsers.
Deployment Configuration
Docker Compose File
services:
redis:
image: redis:7.4.2
container_name: redis
restart: unless-stopped
ports:
- 127.0.0.1:6379:6379
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 30s
timeout: 10s
retries: 5
networks:
- filepizza-net
volumes:
- filepizza-redis-data:/data
# coturn:
# image: coturn/coturn:4.6.3
# container_name: coturn
# restart: unless-stopped
# ports:
# - 3478:3478
# - 3478:3478/udp
# - 5349:5349
# - 5349:5349/udp
# - 60000-60128:60000-60128/udp
# environment:
# - DETECT_EXTERNAL_IP=yes
# - DETECT_RELAY_IP=yes
# command: -n --log-file=stdout --redis-userdb="ip=redis connect_timeout=30" --min-port=60000 --max-port=60128
# networks:
# - traefik-net
# - filepizza-net
# labels:
# - traefik.enable=true
# - traefik.http.routers.coturn.rule=Host(`coturn.trymondo.com`)
# - traefik.http.routers.coturn.entrypoints=websecure
# - traefik.http.routers.coturn.tls=true
# - traefik.http.routers.coturn.tls.certresolver=production
# - traefik.http.services.coturn.loadbalancer.server.port=3478
filepizza:
image: kern/filepizza:7e8650f
container_name: filepizza
restart: unless-stopped
environment:
- PORT=80
- REDIS_URL=redis://redis:6379
- COTURN_ENABLED=false
networks:
- traefik-net
- filepizza-net
depends_on:
- redis
labels:
- traefik.enable=true
- traefik.http.routers.filepizza.rule=Host(`pizza.trymondo.com`)
- traefik.http.routers.filepizza.entrypoints=websecure
- traefik.http.routers.filepizza.tls=true
- traefik.http.routers.filepizza.tls.certresolver=production
- traefik.http.services.filepizza.loadbalancer.server.port=80
networks:
traefik-net:
external: true
filepizza-net:
external: true
volumes:
filepizza-redis-data:
Deployment Instructions
-
Create the deployment directory:
mkdir -p /opt/apps/filepizza
-
Create the
docker-compose.yml
file with the content shown above:
nano /opt/apps/filepizza/docker-compose.yml
-
Deploy the service:
cd /opt/apps/filepizza
docker compose up -d
-
Verify the service is running:
Traefik Integration
FilePizza is configured with the following Traefik settings:
- Host Rule:
pizza.trymondo.com
- Entrypoint: websecure (HTTPS)
- TLS: Enabled with production certificate resolver
- Backend Port: 3000
Usage
- Access the service at
https://pizza.trymondo.com
- File senders can:
- Select a file to share
- Receive a unique URL to share with recipients
- File recipients:
- Open the shared URL
- Download the file directly from the sender’s browser
Important Notes
FilePizza requires WebRTC support in browsers. Some corporate firewalls or
restrictive networks might block WebRTC connections.
FilePizza is a stateless application. No persistent volumes are needed as
files are never stored on the server.
Resource Usage
FilePizza is a lightweight application with minimal resource requirements:
- Memory: Typically less than 100MB
- CPU: Minimal usage during idle periods, moderate during connection establishment
Maintenance
Updates
To update FilePizza to the latest version:
cd /opt/apps/filepizza
docker compose pull
docker compose up -d
Troubleshooting
If the service is inaccessible:
-
Check container status:
-
View container logs:
-
Verify Traefik routing:
curl -I -H "Host: pizza.trymondo.com" https://pizza.trymondo.com
Security Considerations
- FilePizza doesn’t store files, reducing data exposure risks
- All communications go through HTTPS via Traefik
- WebRTC connections are encrypted by default
- Consider adding Traefik middleware for additional security:
- traefik.http.routers.filepizza.middlewares=secureHeaders@file
Additional Resources