Skip to content

Scalable All in One Registry server that handles Packages for NPM, PyPi, Docker/Containers

License

Notifications You must be signed in to change notification settings

treescale/pkgstore

Repository files navigation

About

TreeScale.com pkgstore is a simple NPM, Pypi, and Docker Image registry server, which also acts as a proxy to the generic public registries. It is built for easy maintainability and performance.

Pkgstore is built with an extendable structure that allows for the addition of more storage backends or databases to keep the package metadata information. Currently, by default, the storage backend is an AWS S3 bucket or Minio Bucket if you have a self-hosted environment.

The database is a simple SQLite file, which is configurable from the environment variable of DATABASE_URL, and it acts as a database type selector based on the given database URL prefix, like if you have a postgresql://... then the database instance will act with a PostgreSQL driver. Otherwise, it will fall back to SQLite. You can see how it's done in docker-compose.yaml file

Running Locally with Go

This is a standard Golang Gin project and all the dependencies are inside go.mod and go.sum files. So you can run it with the following steps:

1. Install Go Dependencies

The command below is going to download Go dependencies and put them inside vendor folder.

go mod download
go mod vendor

2. Run the Project

Finally, after having the UI built and Go dependencies installed, we can run the project with the following command:

go run ./cmd/server

OR, we can just build the final binary and run it:

go build -o pkgstore ./cmd/server

./pkgstore

Running with Docker

We have a docker-compose.yaml file that you can use to run the project with Docker. It will run the following services:

  • pkgstore: The main pkgstore service
  • minio: A self-hosted S3 compatible storage service
  • postgres: A PostgreSQL database service

Note: for Docker-Compose based configuration we are using the PostgreSQL database, which makes it easier to run the project with Docker. However, you can change the database URL to any other database type, such as MySQL, SQLite, etc.

docker-compose build
docker-compose up

About

Scalable All in One Registry server that handles Packages for NPM, PyPi, Docker/Containers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages