From a6cc4a52903f56e53007f17197bbd664216f1112 Mon Sep 17 00:00:00 2001 From: Henry Lee Date: Sat, 14 Sep 2024 17:21:53 +0800 Subject: [PATCH] fix(docker): mount db file directly, not use docker volume --- README.md | 3 --- docker-compose-dev.yml | 6 +----- docker-compose.yml | 6 +----- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 50d2cab..73d0376 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,6 @@ For development/testing: # Build the local dev/test image make build-dev -# Create the Airflow DB volume during the first setup -docker volume create --name=airflow-db-volume - # Start dev/test services make deploy-dev diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 2d080d8..f5b0daf 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -7,7 +7,7 @@ x-docker-common: &docker-common context: . dockerfile: Dockerfile.test volumes: - - airflow-db-volume:/opt/airflow/ + - ./airflow.db:/opt/airflow/airflow.db # you can comment out the following line if you don't have service-account.json - ./service-account.json:/opt/airflow/service-account.json restart: unless-stopped @@ -30,7 +30,3 @@ services: depends_on: - airflow command: scheduler - -volumes: - airflow-db-volume: - external: true diff --git a/docker-compose.yml b/docker-compose.yml index 6326e99..c0ea614 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ x-docker-common: &docker-common image: asia-east1-docker.pkg.dev/pycontw-225217/data-team/pycon-etl:latest volumes: - ./service-account.json:/opt/airflow/service-account.json - - airflow-db-volume:/opt/airflow/ + - ./airflow.db:/opt/airflow/airflow.db restart: unless-stopped logging: driver: json-file @@ -26,7 +26,3 @@ services: depends_on: - airflow command: scheduler - -volumes: - airflow-db-volume: - external: true