Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

milk web で --db=を指定しても、環境変数HOMEが無いとエラーになる #90

Open
hkuno9000 opened this issue Jun 25, 2019 · 0 comments

Comments

@hkuno9000
Copy link

Ubuntu 18.04LTS にて、milk web のサービス化を試みたのですが
--db= でパスを指定しても、環境変数HOMEが未定義の状態では、
下記エラーが出て、起動に失敗しました。

error

milk[25792]: /var/lib/gems/2.5.0/gems/milkode-1.8.9.1/lib/milkode/common/dbdir.rb:14:in `expand_path': couldn't find login name -- expanding `~' (ArgumentError)

service の Environment= に HOME変数を定義することで起動に成功しましたが、
--db= でパスが指定されている場合は、DBパス参照に "~" ($HOME) を必要としないようにできませんでしょうか。

/etc/systemd/system/milkweb.service

[Unit]
Description = milk web

[Service]
Environment='HOME=/home/USER'
ExecStart = /usr/local/bin/milk web -n --host 0.0.0.0 --db=/home/USER/.milkode
Restart = always
Type = simple

[Install]
WantedBy = multi-user.target

インストール覚書

https://qiita.com/hkuno/items/27ad63df0c692ef5c9e1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant