mirror of
https://github.com/YunoHost-Apps/simplytranslate_ynh.git
synced 2024-09-03 20:16:26 +02:00
konfigurasi awal
This commit is contained in:
parent
fb7b7a0bf8
commit
b53095cab5
6 changed files with 93 additions and 0 deletions
32
conf/config.conf.template
Normal file
32
conf/config.conf.template
Normal file
|
@ -0,0 +1,32 @@
|
|||
# This is an example configuration file. It can be either
|
||||
# /etc/simplytranslate/web.conf or /etc/simplytranslate/shared.conf (this one
|
||||
# is also used by other frontends, like the Gemini frontend). In case of
|
||||
# duplicate keys between files, the key in `gemini.conf` takes precedence.
|
||||
|
||||
[libre]
|
||||
# LibreTranslate is disabled by default. If it is enabled, `Instance` is required.
|
||||
Enabled = __LIBRETRANSLATE_ENABLE__
|
||||
Instance = __LIBRETRANSLATE_INSTANCE__
|
||||
# Not all instances need an API key; if the one you use don't, remove this
|
||||
# line.
|
||||
ApiKey = __LIBRETRANSLATE_API__
|
||||
|
||||
[google]
|
||||
# Google translate is enabled by default.
|
||||
Enabled = __GOOGLE_ENABLE__
|
||||
|
||||
[deepl]
|
||||
# Deepl Translate does not support async as of right now, it will block all other requests
|
||||
# while it's processing a Deepl Requests, please enable this with caution!
|
||||
Enabled = __DEEPL_ENABLE__
|
||||
|
||||
[iciba]
|
||||
# ICIBA Translate (a.k.a. PowerWord) is disabled by default.
|
||||
Enabled = __ICIBA_ENABLE__
|
||||
|
||||
[reverso]
|
||||
Enabled = __REVERSO_ENABLE__
|
||||
|
||||
[network]
|
||||
port = __PORT__
|
||||
host = 0.0.0.0
|
14
conf/nginx.conf
Normal file
14
conf/nginx.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
#root_path_only location / {
|
||||
#sub_path_only location __PATH__ {
|
||||
# Standard nginx configuration
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_pass http://localhost:__PORT____PATH__;
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
46
conf/systemd.service
Normal file
46
conf/systemd.service
Normal file
|
@ -0,0 +1,46 @@
|
|||
[Unit]
|
||||
Description=Small description of the service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
ExecStart=__INSTALL_DIR__/venv/bin/python3 __INSTALL_DIR__/simplytranslate/main.py -c __INSTALL_DIR__/simplytranslate/config.conf
|
||||
|
||||
# Sandboxing options to harden security
|
||||
# Depending on specificities of your service/app, you may need to tweak these
|
||||
# .. but this should be a good baseline
|
||||
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||
RestrictNamespaces=yes
|
||||
RestrictRealtime=yes
|
||||
DevicePolicy=closed
|
||||
ProtectClock=yes
|
||||
ProtectHostname=yes
|
||||
ProtectProc=invisible
|
||||
ProtectSystem=full
|
||||
ProtectControlGroups=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelTunables=yes
|
||||
LockPersonality=yes
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged
|
||||
|
||||
# Denying access to capabilities that should not be relevant for webapps
|
||||
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
|
||||
CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD
|
||||
CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE
|
||||
CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT
|
||||
CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK
|
||||
CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
|
||||
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
|
||||
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
|
||||
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
|
||||
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
1
doc/DESCRIPTION_id.md
Normal file
1
doc/DESCRIPTION_id.md
Normal file
|
@ -0,0 +1 @@
|
|||
Antarmuka penerjemahan untuk berbagai mesin penerjemahan, ada DeepL, Reverso, ICIBA, Google Translate, dan LibreTranslate (bisa diubah peladen LibreTranslate mana yang mau dipakai).
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
BIN
doc/screenshots/st_id-en.png
Normal file
BIN
doc/screenshots/st_id-en.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 107 KiB |
Loading…
Add table
Reference in a new issue