summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2022-12-18 19:05:31 +0100
committerGeorg Pfuetzenreuter2022-12-18 19:05:31 +0100
commitd3ba0296dab8bb28bd4624366247c722b58d81b1 (patch)
tree9cab29d80bd8853c587c04715c0ece7dc6bbaefe
parentbdc1f1d2b55fe026bebd13905eaaea54d691cb35 (diff)
parent9501cbf678a4ef99ccbd8c53f35b3209569f4c8e (diff)
downloadtakahe-d3ba0296dab8bb28bd4624366247c722b58d81b1.tar.gz
takahe-d3ba0296dab8bb28bd4624366247c722b58d81b1.tar.bz2
takahe-d3ba0296dab8bb28bd4624366247c722b58d81b1.zip
Merge pull request 'Import packaging files' (#2) from libertacasa-package into libertacasa-masterHEADlibertacasa-master
Reviewed-on: https://git.com.de/LibertaCasa/takahe/pulls/2
-rw-r--r--SUSE/takahe-stator.service25
-rw-r--r--SUSE/takahe.service30
-rw-r--r--SUSE/takahe.sysconfig33
-rw-r--r--SUSE/takahe.target10
-rw-r--r--setup.py66
5 files changed, 164 insertions, 0 deletions
diff --git a/SUSE/takahe-stator.service b/SUSE/takahe-stator.service
new file mode 100644
index 0000000..5b9e3ac
--- /dev/null
+++ b/SUSE/takahe-stator.service
@@ -0,0 +1,25 @@
+# This file is shipped as part of the Takahe package.
+# Author: Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net>
+
+[Unit]
+Description=Takahe Stator
+PartOf=takahe.target
+
+[Service]
+User=_takahe
+Group=_takahe
+
+ExecStart=/usr/libexec/takahe/manage.py runstator
+
+PrivateDevices=yes
+PrivateTmp=yes
+ProtectControlGroups=yes
+ProtectHome=yes
+ProtectKernelLogs=yes
+ProtectSystem=strict
+RestrictAddressFamilies=AF_INET6 AF_INET
+SystemCallArchitectures=native
+SystemCallFilter=@system-service
+
+[Install]
+WantedBy=multi-user.target
diff --git a/SUSE/takahe.service b/SUSE/takahe.service
new file mode 100644
index 0000000..dd7d395
--- /dev/null
+++ b/SUSE/takahe.service
@@ -0,0 +1,30 @@
+# This file is shipped as part of the Takahe package.
+# Author: Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net>
+
+[Unit]
+Description=Takahe
+After=postgresql.service
+Wants=postgresql.service
+PartOf=%N.target
+
+[Service]
+User=_%N
+Group=_%N
+
+EnvironmentFile=/etc/sysconfig/%N
+ExecStart=/usr/bin/gunicorn %N.%N.wsgi:application -b "$BIND"
+
+PrivateDevices=yes
+PrivateTmp=yes
+ProtectControlGroups=yes
+ProtectHome=yes
+ProtectKernelLogs=yes
+ProtectSystem=strict
+RestrictAddressFamilies=AF_INET6 AF_INET AF_UNIX
+SystemCallArchitectures=native
+SystemCallFilter=@system-service
+
+ReadWritePaths=/srv/%N/media
+
+[Install]
+WantedBy=multi-user.target
diff --git a/SUSE/takahe.sysconfig b/SUSE/takahe.sysconfig
new file mode 100644
index 0000000..c9f9f3a
--- /dev/null
+++ b/SUSE/takahe.sysconfig
@@ -0,0 +1,33 @@
+# This file is shipped as part of the Takahe package.
+# Author: Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net>
+
+# Hostname or IP address of the database server
+PGHOST=
+
+# Name of the database
+PGDATABASE=
+
+# Username and password to authenticate to the database with
+PGUSER=
+PGPASSWORD=
+
+# Random string - generated during installation
+TAKAHE_SECRET_KEY=__REPLACE_ME__
+
+# Domain Takahe is being served on
+TAKAHE_MAIN_DOMAIN=
+
+# Email address to be promoted as an Administrator - set and uncomment this only for the first start, then comment it again
+# TAKAHE_AUTO_ADMIN_EMAIL=
+
+# Set to true if Takahi is being served behind a reverse proxy
+TAKAHE_USE_PROXY_HEADERS=true
+
+# Directory to store media files in
+TAKAHE_MEDIA_ROOT=/srv/takahe/media
+
+# URL media files are being served from
+TAKAHE_MEDIA_URL=
+
+# IP address and port for the Gunicorn server to bind to
+BIND='[::]:8000'
diff --git a/SUSE/takahe.target b/SUSE/takahe.target
new file mode 100644
index 0000000..9037778
--- /dev/null
+++ b/SUSE/takahe.target
@@ -0,0 +1,10 @@
+# This file is shipped as part of the Takahe package.
+# Author: Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net>
+
+[Unit]
+Description=Target combining all parts of Takahe
+After=network.target
+Requires=%N.service %N-stator.service
+
+[Install]
+WantedBy=multi-user.target
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..dbf4022
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+
+import setuptools
+package = 'takahe'
+python_requires = '>=3.10'
+
+requires = []
+test_requirements = []
+
+foundpackages=setuptools.find_packages(where=".")
+prefixedpackages=prefixed=[package + '.' + item for item in foundpackages]
+
+setuptools.setup(
+ name='Takahe',
+ version='300ccfbfac970c25eb73922687ded719750acc90',
+ description='An ActivityPub/Fediverse server',
+ long_description_content_type='text/markdown',
+ author='Takahe Authors',
+ url='https://jointakahe.org/',
+ packages=prefixedpackages,
+ scripts=["manage.py"],
+ package_data={'': ['LICENSE']},
+ package_dir= {
+ 'takahe.activities': './activities',
+ 'takahe.core': './core',
+ 'takahe.mediaproxy': './mediaproxy',
+ 'takahe.stator': './stator',
+ 'takahe.users': './users',
+ 'takahe.takahe': './takahe',
+ 'takahe.api': './api'
+ },
+ include_package_data=True,
+ python_requires=python_requires,
+ install_requires=[
+'bleach~=5.0.1',
+'blurhash-python~=1.1.3',
+'cryptography~=38.0',
+'dj_database_url~=1.0.0',
+'django-cache-url~=3.4.2',
+'django-htmx~=1.13.0',
+'django-storages[google,boto3]~=1.13.1',
+'django~=4.1',
+'email-validator~=1.3.0',
+'gunicorn~=20.1.0',
+'httpx~=0.23',
+'markdown_it_py~=2.1.0',
+'pillow~=9.3.0',
+'psycopg2~=2.9.5',
+'pydantic~=1.10.2',
+'pyld~=2.0.3',
+'pylibmc~=1.6.3',
+'pymemcache~=4.0.0',
+'python-dotenv~=0.21.0',
+'redis~=4.4.0',
+'sentry-sdk~=1.11.0',
+'sphinx~=5.3.0',
+'urlman~=2.0.1',
+'uvicorn~=0.19',
+'whitenoise~=6.2.0'
+],
+ license='BSD-3',
+ zip_safe=False,
+ classifiers=[
+ 'Programming Language :: Python :: 3.10',
+ ],
+)