Skip to content

Update README.md #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ docker run -d -p 5000:5000 vampi_docker:latest
docker-compose up -d
~~~~


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding error handling information and potential issues one might face while running the application in the README. Current documentation lacks details on troubleshooting and error cases.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please provide an example

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an example of error handling and troubleshooting section that could be added to the README:

## Troubleshooting & Common Issues

### Docker-Related Issues

1. **Port Already in Use**
   ```bash
   Error: Ports are not available: listen tcp 0.0.0.0:5000: bind: address already in use

Solution:

  • Check if another process is using port 5000
  • Kill the existing process: sudo lsof -i :5000 to find the PID, then kill -9 <PID>
  • Or change the port mapping in docker-compose.yml
  1. Docker Container Fails to Start
    If the container exits immediately after starting:
    • Check logs using: docker logs vampi_docker
    • Ensure all dependencies are properly listed in requirements.txt
    • Verify environment variables are correctly set

Application-Specific Issues

  1. Token Authentication Errors

    • If you receive "Token Invalid" errors, ensure:
      • The token hasn't expired (default timeout: X minutes)
      • The token is properly included in the Authorization header
      • The environment variables for JWT_SECRET are correctly set
  2. Database Connection Issues

    Error: Unable to connect to database

    Solution:

    • Verify database credentials in configuration
    • Ensure database service is running
    • Check network connectivity between containers

Environment Configuration

  1. Common Environment Variable Issues
    • Missing or incorrect .env file
    • Required variables:
      JWT_SECRET=your_secret_key
      DB_HOST=localhost
      DB_PORT=5432
      

Getting Help

If you encounter any other issues:

  1. Check the application logs: docker logs vampi_docker
  2. Ensure all prerequisites are installed
  3. Verify you're using supported versions of Docker and Python
  4. Open an issue on GitHub with:
    • Error message
    • Steps to reproduce
    • Environment details

This example provides practical troubleshooting steps for common issues, including:
- Docker-related problems
- Authentication issues
- Database connection problems
- Environment configuration
- General debugging steps

Each section includes specific error messages, their potential causes, and step-by-step solutions, making it easier for users to resolve common problems independently.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should include instructions for running integration tests, API endpoint tests, and expected test coverage metrics (e.g., minimum coverage percentage required for PRs to be accepted).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add documentation about runtime status monitoring and health check endpoints to ensure proper application monitoring in production.


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing testing instructions and test coverage requirements. Should include information about running tests and expected coverage thresholds.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding health check endpoint documentation and status monitoring information for production deployments.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include a section about performance metrics collection and monitoring strategy for production deployments.

## Customizing token timeout and vulnerable environment or not
If you would like to alter the timeout of the token created after login or if you want to change the environment **not** to be vulnerable then you can use a few ways depending how you run the application.

Expand Down
Loading