Skip to content

Instantly share code, notes, and snippets.

@ongzexuan
Last active November 12, 2020 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ongzexuan/4fc808b432e4af93d4a38a1fdaf9d367 to your computer and use it in GitHub Desktop.
Save ongzexuan/4fc808b432e4af93d4a38a1fdaf9d367 to your computer and use it in GitHub Desktop.
Systemd script for Airflow webserver
[Unit]
Description=Airflow webserver daemon
After=network.target
Wants=postgresql.target
[Service]
Environment="PATH=/home/airflow/.local/bin"
User=airflow
Group=airflow
Type=simple
ExecStart=/bin/bash -c "export AIRFLOW_HOME=/home/airflow/airflow; airflow webserver"
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
Restart=on-failure
RestartSec=10s
PrivateTmp=True
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment