Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.
/ pyinfra-xdcstore Public archive

A pyinfra module for deploying xdcstore and xdcget.

Notifications You must be signed in to change notification settings

deltachat/pyinfra-xdcstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyinfra module to deploy xdcstore and xdcget

This repository was moved to https://codeberg.org/webxdc/pyinfra-xstore

This module deploys xdcstore and xdcget.

Prerequisites

To deploy xdcstore and xdcget, you need:

  • root SSH access to a linux server (tested with Debian 12)
  • an email account for the bot
  • a github.com and/or codeberg.org account so the bot can download .xdc files from there; read more about how to create the neccessary API tokens in the documentation.

Use it in python code

This module can be used in a pyinfra deploy.py file like this:

from pyinfra_xdcstore import deploy_xdcstore

deploy_xdcstore(
    unix_user="xdcstore",              # the existing UNIX user of the bot
    bot_email="[email protected]",  # the email address for the bot
    bot_password="p4ssw0rd",           # the password for the bot's email account
    codeberg_user="missytake",         # the username of a codeberg account
    codeberg_token="0987wer09832ru9",  # an API token for the codeberg account
    github_user="missytake",           # the username of a github account
    github_user="983q79mrrrrr9ewum",   # an API token for the github account
)

Deploy with few CLI commands

You can also use this module to deploy xdcstore and xdcget with these few CLI commands:

# install pyinfra, and this module
git clone https://github.com/deltachat/pyinfra-xdcstore
pip install --user .

# configure the bot's credentials
export [email protected]
export XDCSTORE_PASSWORD=p4ssw0rd

# run the deployment
pyinfra --ssh-user root -- <your_server> deploy.py

Additional environment variables you can (and should) use:

XDCGET_UNIX_USER        # as which user on your server you want the bot to run; default: xdcstore
XDCGET_CODEBERG_USER    # the username of a codeberg account
XDCGET_CODEBERG_TOKEN   # an API token for the codeberg account
XDCGET_GITHUB_USER      # the username of a github account
XDCGET_GITHUB_TOKEN     # an API token for the github account

About

A pyinfra module for deploying xdcstore and xdcget.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published