All checks were successful
Build and deploy / Build and Push Docker Images (push) Successful in 2m30s
2.8 KiB
2.8 KiB
ISP Wiremap Application
A web-based mapping application for managing ISP network infrastructure with real-time collaboration features.
Tech Stack
- Backend: FastAPI with Python 3, PostgreSQL 15 with PostGIS
- Frontend: React 19 with TypeScript, Vite, Leaflet for mapping
- Authentication: JWT tokens with bcrypt password hashing
- Real-time: WebSockets for collaborative editing
Getting Started
Run Migrations
docker compose exec python alembic upgrade head
Start the Application
docker compose up -d
The application will be available at http://localhost:8000
User Management
Create Admin User
Interactively create a new admin user with username, email, and password:
docker compose exec python python scripts/create_admin.py
List Users
View all users in the system with their details (username, email, admin status, creation date):
docker compose exec python python scripts/manage_users.py list
Reset User Password
Reset a user's password by providing their username, email, or user ID:
docker compose exec python python scripts/manage_users.py reset-password <username|email|user_id>
Delete User
Delete a user from the system (requires confirmation, affects all their maps and shares):
docker compose exec python python scripts/manage_users.py delete <username|email|user_id>
Toggle Admin Status
Grant or revoke admin privileges for a user:
docker compose exec python python scripts/manage_users.py toggle-admin <username|email|user_id>
Production Deployment
Example Docker Compose configuration for production:
services:
app:
hostname: mapmaker
image: git.shihaam.dev/sarlink/mapmaker/api
env_file: .env
volumes:
- ./storage/images:/var/www/html/storage/images
depends_on:
- postgres
nginx:
hostname: mapmaker-nginx
image: git.shihaam.dev/sarlink/mapmaker/nginx
volumes_from:
- app
ports:
- 8000:80
depends_on:
- app
postgres:
image: postgis/postgis:15-3.3
hostname: database
restart: always
environment:
POSTGRES_USER: mapmaker
POSTGRES_PASSWORD: mapmaker
POSTGRES_DB: mapmaker
volumes:
- ./storage/database:/var/lib/postgresql/data
# ports:
# - "5432:5432"
Environment Configuration
Copy .env.example to .env and configure the required variables:
SECRET_KEY- JWT secret key for token signingDATABASE_URL- PostgreSQL connection stringALLOW_REGISTRATION- Enable/disable public user registration (default: false)ACCESS_TOKEN_EXPIRE_MINUTES- JWT access token lifetime (default: 30)REFRESH_TOKEN_EXPIRE_DAYS- JWT refresh token lifetime (default: 7)
License
GPL v2