A modern ticket management system built with .NET 8 backend, Node.js frontend, and Nginx reverse proxy. Features two-factor authentication for enhanced security.
- Backend: .NET 8 Web API
- Frontend: Node.js
- Proxy: Nginx
- Containerization: Docker & Docker Compose
- Authentication: Cookie-based with 2FA support
ticket-system/
├── TicketSystem.Api/ # .NET 8 Backend
├── TicketSystem.Frontend/ # Node.js Frontend
├── docker-compose.yml # Docker configuration
├── nginx.conf # Nginx configuration
└── README.md # This file
-
Clone the repository
git clone <repository-url> cd ticket-system
-
Start the application
docker-compose up -d
-
Access the application
- Frontend: http://localhost:8080
- API: http://localhost:8080/api/swagger
- Direct API access: http://localhost:5000/api/swagger
- Direct Frontend access: http://localhost:3000
Check if services are running properly:
# View all containers
docker-compose ps
# Check nginx logs
docker-compose logs nginx
# Check API logs
docker-compose logs ticketsystem.api
# Check frontend logs
docker-compose logs ticketsystem.ui-
Check Nginx Status
docker-compose exec nginx nginx -t -
Test HTTP Response
curl -I http://localhost:8080
-
View Nginx Logs
docker-compose logs -f nginx
# Stop all services
docker-compose down
# Stop specific service
docker-compose stop [service-name]# Rebuild services
docker-compose build
# Restart services
docker-compose restart
# View logs
docker-compose logs -f
# Enter container shell
docker-compose exec [service-name] sh- Two-Factor Authentication (2FA)
- Cookie-based authentication
- Secure communication between services
- CORS protection
ASPNETCORE_ENVIRONMENT=Development
ASPNETCORE_URLS=http://+:5000- Default port: 3000
- Configure additional variables in
.envfile
ticketsystem.api:
- Port: 5000
- Environment: Development
- Base Image: mcr.microsoft.com/dotnet/aspnet:8.0ticketsystem.ui:
- Port: 3000
- Base Image: node:alpine
- Hot Reload Enablednginx:
- Port: 8080
- Base Image: nginx:latest
- Reverse Proxy Configuration-
502 Bad Gateway
- Check if all services are running
- Verify nginx configuration
- Check service logs
-
Service not starting
# Check logs docker-compose logs [service-name] # Rebuild service docker-compose build [service-name]
-
Port conflicts
- Modify ports in docker-compose.yml
- Check for running services on same ports
MIT License - See LICENSE for details
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.