upd
This commit is contained in:
@@ -3,6 +3,9 @@ PKG py39-pip py39-pikepdf py39-scikit-learn liberation-fonts-ttf imagemagick7 zb
|
|||||||
SYSRC redis_enable="YES"
|
SYSRC redis_enable="YES"
|
||||||
SERVICE redis start
|
SERVICE redis start
|
||||||
|
|
||||||
|
CP usr /
|
||||||
|
CP tmp /
|
||||||
|
|
||||||
CMD mkdir /opt
|
CMD mkdir /opt
|
||||||
CMD curl -L https://github.com/paperless-ngx/paperless-ngx/releases/download/v1.9.2/paperless-ngx-v1.9.2.tar.xz --output paperless-ngx-v1.9.2.tar.xz
|
CMD curl -L https://github.com/paperless-ngx/paperless-ngx/releases/download/v1.9.2/paperless-ngx-v1.9.2.tar.xz --output paperless-ngx-v1.9.2.tar.xz
|
||||||
CMD tar -zxf paperless-ngx-v1.9.2.tar.xz
|
CMD tar -zxf paperless-ngx-v1.9.2.tar.xz
|
||||||
@@ -17,12 +20,12 @@ CMD sed -i "" -e 's/#PAPERLESS_DATA_DIR/PAPERLESS_DATA_DIR/' /opt/paperless/pape
|
|||||||
CMD sed -i "" -e 's/#PAPERLESS_MEDIA_ROOT/PAPERLESS_MEDIA_ROOT/' /opt/paperless/paperless.conf
|
CMD sed -i "" -e 's/#PAPERLESS_MEDIA_ROOT/PAPERLESS_MEDIA_ROOT/' /opt/paperless/paperless.conf
|
||||||
CMD sed -i "" -e 's/#PAPERLESS_CONSUMPTION_DIR/PAPERLESS_CONSUMPTION_DIR/' /opt/paperless/paperless.conf
|
CMD sed -i "" -e 's/#PAPERLESS_CONSUMPTION_DIR/PAPERLESS_CONSUMPTION_DIR/' /opt/paperless/paperless.conf
|
||||||
CMD sed -i "" -e 's/#PAPERLESS_REDIS/PAPERLESS_REDIS/' /opt/paperless/paperless.conf
|
CMD sed -i "" -e 's/#PAPERLESS_REDIS/PAPERLESS_REDIS/' /opt/paperless/paperless.conf
|
||||||
CMD sed -i "" -e "/PAPERLESS_REDIS/ a\PAPERLESS_DBENGINE=sqlite" /opt/paperless/paperless.conf
|
CMD sed -i "" -e "/PAPERLESS_REDIS/ a\ PAPERLESS_DBENGINE=sqlite" /opt/paperless/paperless.conf
|
||||||
|
|
||||||
|
|
||||||
CMD sed -i "" -e '/PDF/s/rights="none"/rights="read|write"/' /usr/local/etc/ImageMagick-7/policy.xml
|
CMD sed -i "" -e '/PDF/s/rights="none"/rights="read|write"/' /usr/local/etc/ImageMagick-7/policy.xml
|
||||||
|
|
||||||
|
CMD cd /opt/paperless
|
||||||
CMD su paperless -c /tmp/paperless_install
|
CMD su paperless -c /tmp/paperless_install
|
||||||
SYSRC paperlessconsumer_enable="YES"
|
SYSRC paperlessconsumer_enable="YES"
|
||||||
SYSRC paperlesswebserver_enable="YES"
|
SYSRC paperlesswebserver_enable="YES"
|
||||||
|
|||||||
51
README.md
51
README.md
@@ -1,50 +1,5 @@
|
|||||||
## Status
|
# iocage-plugin-paperless-ngx
|
||||||
[](https://gitlab.com/bastillebsd-templates/minecraft-server/commits/master)
|
Artifact file(s) for Paperless NGX iocage plugin
|
||||||
|
|
||||||
## minecraft-server
|
|
||||||
Bastille template for a minecraft server.
|
|
||||||
|
|
||||||
Note: by installing this template you agree to the terms of the [Minecraft EULA](https://aka.ms/MinecraftEULA).
|
After install, the admin username and password are both "admin". Please change at first login for security reasons. The web portal for paperless-ngx will be the jail ip address and port 8000. More information on paperless-ngx can be found at https://paperless-ngx.readthedocs.io/en/latest/index.html.
|
||||||
|
|
||||||
This template includes the `eula=true` acceptance and `LICENSES_ACCEPTED+= minecraft`
|
|
||||||
settings. If you cannot abide the terms of the Minecraft EULA *do not* apply this template.
|
|
||||||
|
|
||||||
### requirements
|
|
||||||
Due to license restrictions (see above Minecraft EULA), redistribution of
|
|
||||||
Minecraft server is prohibited. This means you must build the package manually
|
|
||||||
from the FreeBSD ports tree.
|
|
||||||
|
|
||||||
This template will automate all the build steps but depends on `/usr/ports`
|
|
||||||
existing on the host system.
|
|
||||||
|
|
||||||
To install (or update) `/usr/ports` on the host system use `portsnap` as seen here:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
ishmael ~ # portsnap fetch auto
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: the ports tree is mounted read-only within the container.
|
|
||||||
|
|
||||||
## Bootstrap template
|
|
||||||
|
|
||||||
```shell
|
|
||||||
ishmael ~ # bastille bootstrap https://gitlab.com/bastillebsd-templates/minecraft-server
|
|
||||||
```
|
|
||||||
|
|
||||||
## Apply template
|
|
||||||
|
|
||||||
```shell
|
|
||||||
ishmael ~ # bastille template TARGET bastillebsd-templates/minecraft-server
|
|
||||||
```
|
|
||||||
|
|
||||||
## Access server console
|
|
||||||
|
|
||||||
The minecraft server will run in `STANDALONE` mode meaning the service execution
|
|
||||||
will happen within a `tmux` session. To access this session use this command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
ishmael ~ # bastille service TARGET minecraft console
|
|
||||||
```
|
|
||||||
|
|
||||||
Tip: `tmux` session management is handled using `ctrl-b` prefix. To exit the
|
|
||||||
session press `ctrl-b d`.
|
|
||||||
16
tmp/paperless_install
Normal file
16
tmp/paperless_install
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p /opt/paperless/consume
|
||||||
|
mkdir -p /opt/paperless/media
|
||||||
|
cd /opt/paperless
|
||||||
|
python3.9 -m venv venv
|
||||||
|
sed -i "" -e '/scikit-learn/d;/pikepdf/d;/scipy/d;/numpy/d' /opt/paperless/requirements.txt
|
||||||
|
. venv/bin/activate
|
||||||
|
pip install -q -q --upgrade pip
|
||||||
|
pip install -q -q -r requirements.txt
|
||||||
|
cd src
|
||||||
|
python3.9 manage.py migrate
|
||||||
|
DJANGO_SUPERUSER_PASSWORD=admin
|
||||||
|
python3.9 manage.py createsuperuser --noinput --email=root@localhost --username=admin
|
||||||
|
deactivate
|
||||||
18
usr/local/etc/rc.d/paperlessconsumer
Normal file
18
usr/local/etc/rc.d/paperlessconsumer
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
|
||||||
|
name="paperlessconsumer"
|
||||||
|
rcvar="${name}_enable"
|
||||||
|
procname="daemon"
|
||||||
|
|
||||||
|
pidfile="/var/run/${name}.pid"
|
||||||
|
|
||||||
|
|
||||||
|
command="/usr/sbin/daemon"
|
||||||
|
command_args="-f -P ${pidfile} -u paperless /usr/local/sbin/${name}"
|
||||||
|
|
||||||
|
|
||||||
|
load_rc_config $name
|
||||||
|
run_rc_command "$1"
|
||||||
18
usr/local/etc/rc.d/paperlessscheduler
Normal file
18
usr/local/etc/rc.d/paperlessscheduler
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
|
||||||
|
name="paperlessscheduler"
|
||||||
|
rcvar="${name}_enable"
|
||||||
|
procname="daemon"
|
||||||
|
|
||||||
|
pidfile="/var/run/${name}.pid"
|
||||||
|
|
||||||
|
|
||||||
|
command="/usr/sbin/daemon"
|
||||||
|
command_args="-f -P ${pidfile} -u paperless /usr/local/sbin/${name}"
|
||||||
|
|
||||||
|
|
||||||
|
load_rc_config $name
|
||||||
|
run_rc_command "$1"
|
||||||
18
usr/local/etc/rc.d/paperlesswebserver
Normal file
18
usr/local/etc/rc.d/paperlesswebserver
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
|
||||||
|
name="paperlesswebserver"
|
||||||
|
rcvar="${name}_enable"
|
||||||
|
procname="daemon"
|
||||||
|
|
||||||
|
pidfile="/var/run/${name}.pid"
|
||||||
|
|
||||||
|
|
||||||
|
command="/usr/sbin/daemon"
|
||||||
|
command_args="-f -P ${pidfile} -u paperless /usr/local/sbin/${name}"
|
||||||
|
|
||||||
|
|
||||||
|
load_rc_config $name
|
||||||
|
run_rc_command "$1"
|
||||||
5
usr/local/sbin/paperlessconsumer
Normal file
5
usr/local/sbin/paperlessconsumer
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /opt/paperless/venv/bin/activate
|
||||||
|
cd /opt/paperless/src
|
||||||
|
exec python3.9 manage.py document_consumer
|
||||||
5
usr/local/sbin/paperlessscheduler
Normal file
5
usr/local/sbin/paperlessscheduler
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /opt/paperless/venv/bin/activate
|
||||||
|
cd /opt/paperless/src
|
||||||
|
exec python3.9 /opt/paperless/src/manage.py qcluster
|
||||||
5
usr/local/sbin/paperlesswebserver
Normal file
5
usr/local/sbin/paperlesswebserver
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /opt/paperless/venv/bin/activate
|
||||||
|
cd /opt/paperless/src
|
||||||
|
exec python3.9 manage.py runserver 0.0.0.0:8000
|
||||||
Reference in New Issue
Block a user