Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Bixoto/dokku-pypiserver
Deploy a private PyPI server on Dokku
https://github.com/Bixoto/dokku-pypiserver
dokku pypi-server
Last synced: 14 days ago
JSON representation
Deploy a private PyPI server on Dokku
- Host: GitHub
- URL: https://github.com/Bixoto/dokku-pypiserver
- Owner: Bixoto
- License: mit
- Created: 2024-02-08T09:58:01.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T14:38:09.000Z (16 days ago)
- Last Synced: 2024-10-23T17:37:40.247Z (16 days ago)
- Topics: dokku, pypi-server
- Language: Dockerfile
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Install-anything-on-Dokku - Private PyPI server
README
# dokku-pypiserver
This repository contains a ready-to-use `Dockerfile` to deploy a [PyPI server][pypiserver] on [Dokku](https://dokku.com/).
[pypiserver]: https://github.com/pypiserver/pypiserver#readme
Note: it is configured with no authentication, so it should never be exposed on the outside.
## Setup
On your Dokku server:
```bash
APP_NAME=pypiserver # change if needed
dokku apps:create $APP_NAME# Create storage directories
sudo mkdir /var/lib/dokku/data/storage/pypiserver-data-packages
sudo chown 32767:32767 /var/lib/dokku/data/storage/pypiserver-data-packages
dokku storage:mount $APP_NAME /var/lib/dokku/data/storage/pypiserver-data-packages:/data/packagesdokku ports:set pypiserver http:80:8080
```Then clone this repository, and push to your Dokku remote to deploy it.
### Upgrade
To upgrade, bump the version in the `Dockerfile` and push.
## Cookbook
In the example snippets below we assume you set the dokku app domain to `pypi.example.com`. Replace this with your own
domain. To configure the app to be accessible in your VPN only and have HTTPS, see
[the tutorial on our blog](https://tech.bixoto.com/add-lets-encrypt-ssl-certificates-on-private-domains-with-dokku/).
`foo` is a placeholder; replace it with the alias you want.### Publish a package
```sh
# Config
poetry config repositories.foo https://pypi.example.com/# Publish
poetry build
poetry publish -r foo
```### Install a package
```sh
poetry source add --default foo https://pypi.example.com/simple/
poetry add your_package
```