blob: 2c284fc56318427207c2a91b4d754c8643756a84 [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.7'
services:
postgres:
image: postgres:9.6
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"
webserver:
build:
context: .
dockerfile: scripts/Dockerfile-airflow
args:
LIMINAL_VERSION: ${LIMINAL_VERSION}
image: liminal-airflow
container_name: liminal-webserver
depends_on:
- postgres
environment:
- LOAD_EX=n
- EXECUTOR=Local
- KUBECONFIG=/home/airflow/kube/config
- AIRFLOW__WEBSERVER__WORKERS=1
- LIMINAL_HOME=/opt/airflow/dags
- AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS=False
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgres+psycopg2://airflow:airflow@postgres:5432/airflow
- AIRFLOW_CONN_METADATA_DB=postgres+psycopg2://airflow:airflow@postgres:5432/airflow
- AIRFLOW_VAR__METADATA_DB_SCHEMA=airflow
logging:
options:
max-size: 10m
max-file: "3"
volumes:
- ${LIMINAL_HOME}:/opt/airflow/dags
- ${LIMINAL_HOME}/logs:/opt/airflow/logs
- ${HOME}/.kube:/home/airflow/kube
ports:
- "8080:8080"
command: "webserver"
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
scheduler:
build:
context: .
dockerfile: scripts/Dockerfile-airflow
args:
LIMINAL_VERSION: ${LIMINAL_VERSION}
image: liminal-airflow
container_name: liminal-scheduler
depends_on:
- postgres
- webserver
environment:
- LOAD_EX=n
- EXECUTOR=Local
- AIRFLOW__WEBSERVER__WORKERS=1
- KUBECONFIG=/home/airflow/kube/config
- LIMINAL_HOME=/opt/airflow/dags
- AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS=False
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgres+psycopg2://airflow:airflow@postgres:5432/airflow
- AIRFLOW_CONN_METADATA_DB=postgres+psycopg2://airflow:airflow@postgres:5432/airflow
- AIRFLOW_VAR__METADATA_DB_SCHEMA=airflow
- AIRFLOW__SCHEDULER__SCHEDULER_HEARTBEAT_SEC=10
logging:
options:
max-size: 10m
max-file: "3"
volumes:
- ${LIMINAL_HOME}:/opt/airflow/dags
- ${LIMINAL_HOME}/logs:/opt/airflow/logs
- ${HOME}/.kube:/home/airflow/kube
ports:
- "8793:8793"
command: "scheduler"
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3