Skip to content

magley/mocker-hub

Repository files navigation

mocker-hub

Static Badge

Python TypeScript Bash CSS Sass HTML YAML JSON JWT

FastAPI Postgres Nginx Redis Vite React Bootstrap Docker Docker ElasticSearch Pytest GitHub Actions

GitHub Issues or Pull Requests GitHub Issues or Pull Requests

Getting started

  1. You can optionally regenerate the certificate in /distribution/certs.

  2. Build: docker compose build

  3. Run: docker compose up

  4. Use debug data while developing. On the first run, while the database is empty, visit http://localhost:8000/api/v1/dummy (do this just once).

Nginx and the web app

During development, run the client/ app locally using npm run dev.

In production, you should use nginx as the web app server. To do this, comment in the test environment and comment out the production environment in the root Dockerfile.

Access points

You can access the server at localhost:8000.

While developing the API, use Swagger docs: localhost:8000/docs.

Database UI is in localhost:8002. Check compose.yaml for the login credentials.

The initial superadmin password is stored in volume-server-cfg/superadmin_password.txt.

Using the registry

To push and pull images through mocker-hub, use the registry:

Log in:

docker login localhost:5000

In case you still have issues, create a file /etc/docker/daemon.json and write the following:

{
 "insecure-registries": ["localhost:5000"]
}

Push an image into the registry:

docker tag {image-name}[:{tag}] localhost:5000/{image-name}[:{tag}]
docker push localhost:5000/{image-name}[:{tag}]

If no :tag is provided, latest is used by default.

Pull an image from the registry:

docker pull localhost:5000/{image-name}[:{tag}]

Log out:

docker logout localhost:5000

Screenshots

  1. The Explore section lets you search and filter all repositories:

  2. Clicking on any repository opens its home page. The overview shows the description:

  3. You can also preview and search through repository tags (if any):

  4. User's repositories can be searched and filtered:

  5. Creating a new repository:

  6. List of user's organizations:

  7. Creating a new organization. If an image is not specified, one will be automatically created

  8. View members of the organization. If you are an owner of the org, you can add and remove users.

  9. List repositories belonging to an organization

  10. Organization teams

  11. Clicking on a team opens its details. The owner can modify the name and description of a team, as well as add and remove members from the team.

  12. Team permissions are defined for each repository belonging to an organization.

  13. Repositories can be starred by clicking on the star icon.

  14. Users can see their starred repositories.

  15. Users can modify their details. The username cannot be changed.

  16. The login page

  17. The registration page

  18. Admins can search for users in the database and assign them special badges.

  19. Admins can search through logs created by the various services. Advanced search is supported.

  20. Clicking on the help button opens a side panel that explains how to search for logs, with provided examples.

License

This project is licensed with the BSD 2-Clause License. See LICENSE for more info.

About

Docker Hub clone

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •