ユーザ用ツール

サイト用ツール


サイドバー

最新の10件
一覧
webapp:bepasty

bepasty

バイナリ対応のpastbinサービス. Debian pkgあり. asciinema再生対応.

ユーザという概念がなく,パスワードに権限を設定する.

設定例

 diff -u /usr/share/doc/bepasty/examples/bepasty.conf.example /etc/bepasty.conf
--- /usr/share/doc/bepasty/examples/bepasty.conf.example        2021-01-02 20:32:07.000000000 +0900
+++ /etc/bepasty.conf   2022-03-10 06:12:07.854794765 +0900
@@ -7,7 +7,7 @@
 """

 #: name of this site (put YOUR bepasty fqdn here)
-SITENAME = 'bepasty.example.org'
+SITENAME = 'raspberrypi.local'

 #: base URL path of app (if not served on root URL, but e.g. on http://example.org/bepasty ).
 #: setting this to a non-None value will activate the PrefixMiddleware that splits PATH_INFO
@@ -70,15 +70,15 @@
 STORAGE = 'filesystem'

 #: Filesystem storage path
-STORAGE_FILESYSTEM_DIRECTORY = '/srv/bepasty/storage'
+STORAGE_FILESYSTEM_DIRECTORY = '/var/data/bepasty/storage'

 #: server secret key needed for safe session cookies.
 #: you must set a very long, very random, very secret string here,
 #: otherwise bepasty will not work (and crash when trying to log in)!
-SECRET_KEY = ''
+SECRET_KEY = 'nopNidtiweafDyrosHaltIlsEbNejwilroipKewwircUchheidsavRephsozbunsEshyaDriFrudtugPajHorvOvkiukIdEuWymar1queefOdHilcalOlmEynsIphCef'

 #: transmit cookie only over https (if you use http, set this to False)
-SESSION_COOKIE_SECURE = True
+SESSION_COOKIE_SECURE = False
 #: use a permanent session (True, cookie will expire after the given
 #: time, see below) or not (False, cookie will get removed when browser
 #: is closed)
@@ -114,8 +114,10 @@
 #:     }
 PERMISSIONS = {
     # 'foo': 'admin,list,create,read,delete',
+    'admin_sheatshyeuligg': 'admin,list,create,read,delete',
+    'upuser_OmnomGatyosken': 'list,create,read',
 }

 #: not-logged-in users get these permissions -
 #: usually they are either no permissions ('') or read-only ('read').
-DEFAULT_PERMISSIONS = ''
+DEFAULT_PERMISSIONS = 'read'

とりあえずの’起動

$ sudo -u bepasty BEPASTY_CONFIG=/etc/bepasty.conf bepasty-server --host 0.0.0.0 --debug

tips

認証がうまく行かない

PERMISSIONSに設定したパスワードで認証が通らない.exampleのコメントを外しても駄目.

そこときのlog

"POST /+login HTTP/1.1" 302 -

http だったので SESSION_COOKIE_SECURE = False が必要だった.

#: transmit cookie only over https (if you use http, set this to False)
SESSION_COOKIE_SECURE = False

asciinema playerが動作しない(未解決)

以下を見ると .cast とすれば良さそうだがプレイヤーが表示されない.

ウェブブラウザ側でプレイヤーが取得できていない

6gAXAuPz:136 GET http://raspberrypi.local:5000/xstatic/asciinema_player/asciinema-player.js 404 (NOT FOUND)

コメント

コメントを入力. Wiki文法が有効です:
   ___    __  ___ ______   __    __ __
  / _ )  /  |/  //_  __/  / /   / //_/
 / _  | / /|_/ /  / /    / /__ / ,<   
/____/ /_/  /_/  /_/    /____//_/|_|
 
webapp/bepasty.txt · 最終更新: 2022/03/10 07:09 by matoken