English | Español
This directory contains all Docker configuration files for deploying LaChispa Web application. LaChispa is a Lightning Network wallet built with Flutter.
docker/
├── Dockerfile # Multi-stage build (Flutter + Nginx)
├── docker-compose.yml # Service orchestration
├── nginx.conf # Nginx configuration
└── README.md # This file
- Docker Engine 20.10+
- Docker Compose 2.0+
cd docker
docker-compose up -d --buildhttp://localhost:7777
docker-compose logs -fdocker-compose down| Variable | Default | Description |
|---|---|---|
NGINX_HOST |
localhost |
Nginx host |
NGINX_PORT |
80 |
Nginx port |
| Argument | Default | Description |
|---|---|---|
FLUTTER_WEB_RENDERER |
html |
Flutter web renderer (html or canvaskit) |
| Port | Service |
|---|---|
7777 |
HTTP (Nginx) |
The service includes Traefik labels for automatic discovery:
labels:
- "traefik.enable=true"
- "traefik.http.routers.lachispa.rule=Host(`lachispa.local`)"
- "traefik.http.services.lachispa.loadbalancer.server.port=8080"Ensure Traefik is running in your Docker environment.
docker-compose up -d --buildThe container includes a health check that verifies the web server responds:
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10sDefault deployment includes resource limits:
deploy:
resources:
limits:
cpus: '1'
memory: 512M- Gzip compression
- Rate limiting (10 req/s API, 30 req/s general)
- Security headers (CSP, X-Frame-Options, etc.)
- Static asset caching (1 year)
- PWA support (service worker caching)
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin
Content-Security-Policy: default-src 'self'; ...
- API endpoints: 10 requests/second
- General requests: 30 requests/second
- Burst: 20 requests
# Check logs
docker-compose logs
# Verify ports aren't in use
netstat -tulpn | grep 7777# Clean build cache
docker-compose build --no-cachedocker inspect lachispa-web | grep -A 20 "Health"docker-compose up -d --builddocker exec -it lachispa-web shSee root project LICENSE file.
English | Español
Este directorio contiene todos los archivos de configuración Docker para desplegar la aplicación web de LaChispa. LaChispa es una billetera de Lightning Network construida con Flutter.
docker/
├── Dockerfile # Build multi-stage (Flutter + Nginx)
├── docker-compose.yml # Orquestación de servicios
├── nginx.conf # Configuración de Nginx
└── README.md # Este archivo
- Docker Engine 20.10+
- Docker Compose 2.0+
cd docker
docker-compose up -d --buildhttp://localhost:7777
docker-compose logs -fdocker-compose down| Variable | Valor Predeterminado | Descripción |
|---|---|---|
NGINX_HOST |
localhost |
Host de Nginx |
NGINX_PORT |
80 |
Puerto de Nginx |
| Argumento | Valor Predeterminado | Descripción |
|---|---|---|
FLUTTER_WEB_RENDERER |
html |
Renderizador web de Flutter (html o canvaskit) |
| Puerto | Servicio |
|---|---|
7777 |
HTTP (Nginx) |
El servicio incluye etiquetas de Traefik para descubrimiento automático:
labels:
- "traefik.enable=true"
- "traefik.http.routers.lachispa.rule=Host(`lachispa.local`)"
- "traefik.http.services.lachispa.loadbalancer.server.port=8080"Asegúrate de que Traefik esté ejecutándose en tu entorno Docker.
docker-compose up -d --buildEl contenedor incluye una verificación de salud que verifica que el servidor web responde:
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10sEl despliegue incluye límites de recursos por defecto:
deploy:
resources:
limits:
cpus: '1'
memory: 512M- Compresión Gzip
- Limitación de tasa (10 req/s API, 30 req/s general)
- Encabezados de seguridad (CSP, X-Frame-Options, etc.)
- Caché de activos estáticos (1 año)
- Soporte PWA (caché service worker)
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin
Content-Security-Policy: default-src 'self'; ...
- Endpoints API: 10 solicitudes/segundo
- Solicitudes generales: 30 solicitudes/segundo
- Ráfaga: 20 solicitudes
# Verificar logs
docker-compose logs
# Verificar puertos en uso
netstat -tulpn | grep 7777# Limpiar caché de build
docker-compose build --no-cachedocker inspect lachispa-web | grep -A 20 "Health"docker-compose up -d --builddocker exec -it lachispa-web shVer archivo LICENSE en la raíz del proyecto.