Flask-based backend application with WebSocket support.
Uses pre-built images from GitHub Container Registry:
docker-compose up -dThis will start:
- Backend (Flask): http://localhost:5000
- Frontend: http://localhost:80
Builds backend locally with hot-reload:
docker-compose -f docker-compose.dev.yml upThis mounts the local directory for live code changes.
# Install dependencies
pip install -r requirements.txt
# Run the Flask app
python main.pyThe server will be available at http://localhost:5000
The GitHub Actions workflow automatically:
- Builds the Docker image on push to master
- Pushes to GitHub Container Registry as ghcr.io/in2siders/backend:latest
- Tags with commit SHA for version tracking
- GET /- Health check
- GET /v1/auth/check- Check username availability
- POST /v1/auth/register- Register new user
- POST /v1/auth/challenge- Request authentication challenge
- POST /v1/auth/challenge/verify- Verify challenge solution
- connect- Client connection event
- packet- Send/receive packets
- Backend: ghcr.io/in2siders/backend:latest
- Frontend: ghcr.io/in2siders/frontend-web:latest
┌─────────────┐      ┌─────────────┐
│  Frontend   │─────▶│   Backend   │
│   (Port 80) │◀─────│  (Port 5000)│
└─────────────┘      └─────────────┘
       │                    │
       └────────────────────┘
           app-network
The frontend and backend communicate through a shared Docker network (app-network).
- FLASK_APP=main.py- Flask application entry point
- FLASK_ENV=production- Environment mode (use- developmentfor debug mode)
- FLASK_RUN_HOST=0.0.0.0- Bind to all interfaces
- PORT=5000- Application port (can be changed via environment variable)
- BACKEND_URL=http://backend:5000- Backend URL for frontend
The application uses the PORT environment variable (defaults to 5000). To run on a different port:
Using Docker:
docker run -p 8080:8080 -e PORT=8080 ghcr.io/in2siders/backend:latestUsing Docker Compose:
environment:
  - PORT=8080
ports:
  - "8080:8080"Local Development:
PORT=8080 python main.pyTo test the frontend with the backend locally:
- Run docker-compose upin this repository
- The backend will be accessible at http://localhost:5000
- The frontend can communicate with the backend via the hostname backendwithin the Docker network