56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
version: '3.8'
|
|
services:
|
|
postgres:
|
|
image: postgres:13
|
|
environment:
|
|
- POSTGRES_USER=airflow
|
|
- POSTGRES_PASSWORD=airflow
|
|
- POSTGRES_DB=airflow
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
airflow-webserver:
|
|
build: .
|
|
user: "50000:0"
|
|
depends_on:
|
|
- postgres
|
|
environment:
|
|
- PYTHONPATH=/opt/airflow
|
|
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
|
|
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
|
|
- AIRFLOW__CORE__LOAD_EXAMPLES=False
|
|
volumes:
|
|
- airflow_logs:/opt/airflow/logs
|
|
- airflow_plugins:/opt/airflow/plugins
|
|
ports:
|
|
- "8081:8080"
|
|
command: bash -c "airflow db init && airflow webserver"
|
|
|
|
airflow-scheduler:
|
|
build: .
|
|
user: "50000:0"
|
|
depends_on:
|
|
- postgres
|
|
environment:
|
|
- PYTHONPATH=/opt/airflow
|
|
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
|
|
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
|
|
# koneksi DB dashboard akreditasi + SerpAPI (nilai di-set di Coolify UI)
|
|
- DB_HOST=${DB_HOST:-host.docker.internal}
|
|
- DB_PORT=${DB_PORT:-7891}
|
|
- DB_USER=${DB_USER:-root}
|
|
- DB_PASS=${DB_PASS}
|
|
- DB_NAME=${DB_NAME:-informatika}
|
|
- SERPAPI_KEY=${SERPAPI_KEY}
|
|
- SERPAPI_MAX_REQUESTS=${SERPAPI_MAX_REQUESTS:-90}
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- airflow_logs:/opt/airflow/logs
|
|
- airflow_plugins:/opt/airflow/plugins
|
|
command: scheduler
|
|
|
|
volumes:
|
|
postgres_data:
|
|
airflow_logs:
|
|
airflow_plugins: |