Spaces:
Runtime error
Runtime error
Create entrypoint.sh
Browse files- entrypoint.sh +19 -0
entrypoint.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Initialize the database
|
| 4 |
+
airflow db init
|
| 5 |
+
|
| 6 |
+
# Create an admin user (you can modify this section with your desired credentials)
|
| 7 |
+
airflow users create \
|
| 8 |
+
--username admin \
|
| 9 |
+
--firstname Admin \
|
| 10 |
+
--lastname User \
|
| 11 |
+
--role Admin \
|
| 12 |
+
--email admin@example.com \
|
| 13 |
+
--password admin
|
| 14 |
+
|
| 15 |
+
# Start the web server on the specified port
|
| 16 |
+
airflow webserver --port 7860 &
|
| 17 |
+
|
| 18 |
+
# Start the scheduler
|
| 19 |
+
exec airflow scheduler
|