Created
October 15, 2023 14:21
-
-
Save im-noob/9a65975c07e76efe566d616c7485848c to your computer and use it in GitHub Desktop.
Airflow SystemCtl SystemMD Config for webserver and scheduler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /lib/systemd/system/airflow-scheduler.service | |
[Unit] | |
Description=Airflow scheduler daemon | |
After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service | |
Wants=postgresql.service mysql.service redis.service rabbitmq-server.service | |
[Service] | |
Environment="PATH=$PATH:/home/aarav/anaconda3/envs/airflow/bin" | |
User=aarav | |
Group=sudo | |
Type=simple | |
#ExecStart=/home/aarav/anaconda3/envs/airflow/bin/airflow scheduler | |
ExecStart=/bin/bash -c 'PATH=/home/aarav/anaconda3/envs/airflow/bin:$PATH exec /home/aarav/anaconda3/envs/airflow/bin/airflow scheduler' | |
Restart=always | |
RestartSec=5s | |
[Install] | |
WantedBy=multi-user.target | |
# /lib/systemd/system/airflow-webserver.service | |
[Unit] | |
Description=Airflow webserver daemon | |
After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service | |
Wants=postgresql.service mysql.service redis.service rabbitmq-server.service | |
[Service] | |
Environment="PATH=$PATH:/home/aarav/anaconda3/envs/airflow/bin" | |
User=aarav | |
Group=sudo | |
Type=simple | |
ExecStart=/home/aarav/anaconda3/envs/airflow/bin/airflow webserver --pid /home/aarav/airflow/webserver.pid | |
Restart=on-failure | |
RestartSec=5s | |
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