LoginSignup
3
5

More than 5 years have passed since last update.

supersetをsystemdで動作させる

Last updated at Posted at 2017-01-13

supersetを起動するときにデーモンとして起動するオプションがなかったのでsystemdで起動する方法をまとめました。
インストールなどはこちらを参照して進めました。

Unitファイルの作成

/etc/systemd/system/superset.service
[Unit]
Description=superset
Requires=network-online.target
After=network-online.target

[Service]
EnvironmentFile=-/etc/sysconfig/superset.conf
Restart=on-failure
ExecStart=/bin/superset runserver -p $PORT -w $WORKERS
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target

設定ファイルの作成

/etc/sysconfig/superset.conf
PORT=8080
WORKERS=2

反映

systemctl daemon-reload

結果

これでsystemctlで起動・停止ができるようになる

systemctl start superset
systemctl stop superset

その他

vagrantを使ってsupersetをお試し起動できるようにしました。
こちらにも反映しています。

参考

3
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
5