Created
April 10, 2025 03:13
-
-
Save 1eedaegon/93058fa79582c385fa971ea6288e9d86 to your computer and use it in GitHub Desktop.
how to setup airflow using systemd with venv
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
######### Ariflow Web ######### | |
[Unit] | |
Description=Airflow Webserver | |
After=network.target | |
[Service] | |
User=1000 | |
Group=1000 | |
WorkingDirectory=/home/ec2-user/workspace/airflow-venv | |
Environment=AIRFLOW_HOME=/home/ec2-user/workspace/airflow-venv # venv path | |
ExecStart=/home/ec2-user/workspace/airflow-venv/.venv/bin/python -m airflow webserver --port 8080 | |
Restart=always | |
RestartSec=5s | |
[Install] | |
WantedBy=multi-user.target | |
######### Ariflow Scheduler ######### | |
[Unit] | |
Description=Airflow Scheduler | |
After=network.target | |
[Service] | |
User=1000 | |
Group=1000 | |
WorkingDirectory=/home/ec2-user/workspace/airflow-venv | |
Environment=AIRFLOW_HOME=/home/ec2-user/workspace/airflow-venv # venv path | |
ExecStart=/home/ec2-user/workspace/airflow-venv/.venv/bin/python -m airflow scheduler # airflow scheduler | |
Restart=always | |
RestartSec=5s | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment