-
-
Notifications
You must be signed in to change notification settings - Fork 0
Docker Setup
Amit Das edited this page Apr 28, 2026
·
1 revision
This guide explains how to run SecureAuth using Docker.
Docker deployment provides a clean, isolated, and production-ready environment for SecureAuth.
Benefits of using Docker:
- Easy deployment
- Consistent environments
- Simplified dependency management
- Portable deployments
- Isolation from host system
Before starting:
- Docker installed
- Docker daemon running
Verify installation:
docker --versiongit clone https://github.com/AmitDas4321/SecureAuth.git
cd SecureAuthCreate a .env file.
Example:
# ===============================================
# SecureAuth - ENVIRONMENT CONFIGURATION
# ===============================================
APP_NAME="SecureAuth"
APP_URL="https://example.com"
# TEXTSNAP CONFIG
TEXTSNAP_INSTANCE_ID="YOUR_INSTANCE_ID"
TEXTSNAP_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
# FIREBASE CONFIG
FIREBASE_DATABASE_URL="YOUR_FIREBASE_DATABASE_URL"
FIREBASE_DATABASE_SECRET="YOUR_FIREBASE_DATABASE_SECRET"
# SECURITY CONFIG
JWT_SECRET="YOUR_SECRET_KEY"
ENCRYPTION_KEY="YOUR_ENCRYPTION_KEY"Build the SecureAuth Docker image.
docker build -t secureauth .Run SecureAuth container.
docker run -d \
-p 3000:3000 \
--env-file .env \
--name secureauth-app \
secureauthOpen:
http://localhost:3000docker psdocker stop secureauth-appdocker start secureauth-appdocker restart secureauth-appdocker rm -f secureauth-appView application logs.
docker logs secureauth-appdocker logs -f secureauth-appAfter code updates:
docker rm -f secureauth-appdocker build -t secureauth .docker run -d \
-p 3000:3000 \
--env-file .env \
--name secureauth-app \
secureauthRecommended production architecture:
Client
↓
Nginx Reverse Proxy
↓
Docker Container
↓
SecureAuth ApplicationFor production deployments:
- Use HTTPS
- Configure SSL certificates
- Use reverse proxy protection
Example docker-compose.yml
version: "3.9"
services:
secureauth:
build: .
container_name: secureauth-app
ports:
- "3000:3000"
env_file:
- .env
restart: unless-stoppeddocker compose up -ddocker compose downAllow required ports.
Example:
sudo ufw allow 3000Recommended:
sudo ufw allow 80
sudo ufw allow 443Error:
Bind for 0.0.0.0:3000 failedSolution:
lsof -i :3000Check logs:
docker logs secureauth-appEnsure .env exists.
Clear Docker cache:
docker builder pruneFor production environments:
- Use reverse proxy
- Enable HTTPS
- Restrict server access
- Monitor container logs
- Rotate secrets regularly
Test locally:
curl http://127.0.0.1:3000Continue with:
Secure • Fast • Modern ⚡
SecureAuth
Secure • Fast • Modern ⚡