Configuration :
Une paire de clés RSA est nécessaire pour ActivityPub.
Elles peuvent être générées ainsi :
Bloc de code | ||
---|---|---|
| ||
from Crypto.PublicKey import RSA
activitypub_key = RSA.generate(2048)
# Generate the private key
# Add the content of this command in 'pod/custom/settings_local.py'
# in a variable named ACTIVITYPUB_PRIVATE_KEY
with open("pod/activitypub/ap.key", "w") as fd:
fd.write(activitypub_key.export_key().decode())
# Generate the public key
# Add the content of this command in 'pod/custom/settings_local.py'
# in a variable named ACTIVITYPUB_PUBLIC_KEY
with open("pod/activitypub/ap.pub", "w") as fd:
fd.write(activitypub_key.publickey().export_key().decode()) |
Rajouter la configuration Celery/Redis dans le fichier settings_local.py
...