Last active
November 24, 2020 05:07
-
-
Save loverico/eec0ee80ef0c7116cfce202bdb875d01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
postgres: | |
container_name: | |
"airflow_postgres" | |
image: postgres:9.6 | |
environment: | |
- POSTGRES_USER=airflow | |
- POSTGRES_PASSWORD=airflow | |
- POSTGRES_DB=airflow | |
logging: | |
options: | |
max-size: 10m | |
max-file: "3" | |
volumes: | |
- airflow_database:/var/lib/postgresql/data | |
webserver: | |
container_name: 'airflow_server' | |
image: puckel/docker-airflow:for_gcp | |
restart: always | |
depends_on: | |
- postgres | |
env_file: | |
- .env | |
logging: | |
options: | |
max-size: 10m | |
max-file: "3" | |
volumes: | |
- ./composer/dags:/usr/local/airflow/dags #composer と DAG フォルダパスを合致させるなら、 /home/airflow/gcs/dags に設定 | |
- ./local_airflow/config:/tmp/config | |
- ./local_airflow/credentials/:/tmp/credentials/ | |
ports: | |
- "${WEB_SERVER_PORT}:8080" | |
command: > | |
bash -c " | |
gcloud auth activate-service-account ${SERVICE_ACCOUNT} --key-file=${GOOGLE_APPLICATION_CREDENTIALS} --project ${PROJECT_ID} && | |
airflow variables --import /tmp/config/${AIRFLOW_VARIABLE_FILE_NAME} && | |
/entrypoint.sh webserver | |
" | |
volumes: | |
airflow_database: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment