Корректный проброс ключа webserver

This commit is contained in:
2025-11-03 20:26:12 +03:00
parent 42d5fcbc8a
commit 49c9cb8cef
3 changed files with 11 additions and 1 deletions
+1
View File
@@ -1,6 +1,7 @@
# Airflow Configuration
AIRFLOW_USER=admin
AIRFLOW_PASSWORD=admin
AIRFLOW__WEBSERVER__SECRET_KEY=your-super-secret-key-here-replace-with-actual-random-key
# PostgreSQL (Airflow metadata)
PG_USER=airflow
+7 -1
View File
@@ -2,7 +2,7 @@ SHELL := /bin/bash
UV := uv
PYTHON_VERSION := 3.11
.PHONY: up down airflow-init logs gp-psql ddl-gp dev-setup dev-sync dev-lock test lint fmt clean-venv
.PHONY: up down start stop airflow-init logs gp-psql ddl-gp dev-setup dev-sync dev-lock test lint fmt clean-venv
up:
docker compose -f docker-compose.yml up -d
@@ -10,6 +10,12 @@ up:
down:
docker compose -f docker-compose.yml down -v
start:
docker compose -f docker-compose.yml start
stop:
docker compose -f docker-compose.yml stop
airflow-init:
docker compose -f docker-compose.yml run --rm airflow-init
+3
View File
@@ -47,6 +47,7 @@ services:
environment:
AIRFLOW__CORE__LOAD_EXAMPLES: "False"
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://${PG_USER}:${PG_PASSWORD}@pgmeta:5432/${PG_DB}
AIRFLOW__WEBSERVER__SECRET_KEY: ${AIRFLOW__WEBSERVER__SECRET_KEY}
command: >
bash -lc "pip install --no-cache-dir -r /opt/airflow/requirements.txt &&
airflow webserver"
@@ -69,6 +70,7 @@ services:
environment:
AIRFLOW__CORE__LOAD_EXAMPLES: "False"
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://${PG_USER}:${PG_PASSWORD}@pgmeta:5432/${PG_DB}
AIRFLOW__WEBSERVER__SECRET_KEY: ${AIRFLOW__WEBSERVER__SECRET_KEY}
command: >
bash -lc "pip install --no-cache-dir -r /opt/airflow/requirements.txt &&
airflow scheduler"
@@ -89,6 +91,7 @@ services:
environment:
AIRFLOW__CORE__LOAD_EXAMPLES: "False"
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://${PG_USER}:${PG_PASSWORD}@pgmeta:5432/${PG_DB}
AIRFLOW__WEBSERVER__SECRET_KEY: ${AIRFLOW__WEBSERVER__SECRET_KEY}
volumes:
- ./airflow/dags:/opt/airflow/dags
- ./airflow/requirements.txt:/opt/airflow/requirements.txt