blob: cca6cee7ca179ec732aa0007c2ce2266b9a889db [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
---
version: '3'
x-airflow-common: &airflow-common
image: liminal-airflow
build:
context: .
dockerfile: scripts/Dockerfile-airflow
args:
LIMINAL_VERSION: ${LIMINAL_VERSION}
environment: &airflow-common-env
LOAD_EX: n
AIRFLOW__CORE__EXECUTOR: LocalExecutor
KUBECONFIG: /home/airflow/kube/config
<<<<<<< Updated upstream
=======
AWS_DEFAULT_REGION: "${AWS_DEFAULT_REGION:-us-east-1}"
>>>>>>> Stashed changes
AIRFLOW__CORE__LOAD_EXAMPLES: 'False'
AIRFLOW__WEBSERVER__WORKERS: '1'
AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'True'
_AIRFLOW_DB_UPGRADE: 'true'
LIMINAL_HOME: /opt/airflow/dags
AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS: 'False'
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
AIRFLOW_CONN_METADATA_DB: postgresql+psycopg2://airflow:airflow@postgres:5432/airflow
AIRFLOW_VAR__METADATA_DB_SCHEMA: airflow
volumes:
- ${LIMINAL_HOME}/liminal:/opt/airflow/dags/liminal/
- ${LIMINAL_HOME}:/opt/airflow/dags
- ${LIMINAL_HOME}/logs:/opt/airflow/logs
- ${HOME}/.kube:/home/airflow/kube
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: [CMD-SHELL, '[ -f /usr/local/airflow/airflow-webserver.pid ]']
interval: 30s
timeout: 30s
retries: 3
logging:
options:
max-size: 10m
max-file: '3'
restart: always
services:
postgres:
image: postgres:13
container_name: liminal-postgress
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: ''
ports:
- 5432:5432
volumes:
- ${LIMINAL_HOME}/db:/var/lib/postgresql/data
logging:
options:
max-size: 10m
max-file: '3'
healthcheck:
test: [CMD, pg_isready, -U, airflow]
interval: 30s
timeout: 30s
retries: 3
restart: always
webserver:
<<: *airflow-common
container_name: liminal-webserver
environment:
<<: *airflow-common-env
ports:
- 8080:8080
command: webserver
scheduler:
<<: *airflow-common
container_name: liminal-scheduler
environment:
<<: *airflow-common-env
ports:
- 8793:8793
command: scheduler