From a22d1931b7593ad6133ff4ae43ae94a1d41bb79e Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Tue, 8 Jun 2021 10:55:49 +0300 Subject: [PATCH] Ensure Docker loads local_postgres sql scripts in correct order Signed-off-by: Olga Bulat --- .../{airflow_user_db.sql => 01_airflow_user_db.sql} | 0 .../{aws_s3_mock.sql => 02_aws_s3_mock.sql} | 0 ...image_schema.sql => 03_openledger_image_schema.sql} | 0 ...ger_image_view.sql => 04_openledger_image_view.sql} | 0 ...e_schema.sql => 05_openledger_old_image_schema.sql} | 0 src/cc_catalog_airflow/local_postgres/Dockerfile | 10 +++++----- 6 files changed, 5 insertions(+), 5 deletions(-) rename src/cc_catalog_airflow/local_postgres/{airflow_user_db.sql => 01_airflow_user_db.sql} (100%) rename src/cc_catalog_airflow/local_postgres/{aws_s3_mock.sql => 02_aws_s3_mock.sql} (100%) rename src/cc_catalog_airflow/local_postgres/{openledger_image_schema.sql => 03_openledger_image_schema.sql} (100%) rename src/cc_catalog_airflow/local_postgres/{openledger_image_view.sql => 04_openledger_image_view.sql} (100%) rename src/cc_catalog_airflow/local_postgres/{openledger_old_image_schema.sql => 05_openledger_old_image_schema.sql} (100%) diff --git a/src/cc_catalog_airflow/local_postgres/airflow_user_db.sql b/src/cc_catalog_airflow/local_postgres/01_airflow_user_db.sql similarity index 100% rename from src/cc_catalog_airflow/local_postgres/airflow_user_db.sql rename to src/cc_catalog_airflow/local_postgres/01_airflow_user_db.sql diff --git a/src/cc_catalog_airflow/local_postgres/aws_s3_mock.sql b/src/cc_catalog_airflow/local_postgres/02_aws_s3_mock.sql similarity index 100% rename from src/cc_catalog_airflow/local_postgres/aws_s3_mock.sql rename to src/cc_catalog_airflow/local_postgres/02_aws_s3_mock.sql diff --git a/src/cc_catalog_airflow/local_postgres/openledger_image_schema.sql b/src/cc_catalog_airflow/local_postgres/03_openledger_image_schema.sql similarity index 100% rename from src/cc_catalog_airflow/local_postgres/openledger_image_schema.sql rename to src/cc_catalog_airflow/local_postgres/03_openledger_image_schema.sql diff --git a/src/cc_catalog_airflow/local_postgres/openledger_image_view.sql b/src/cc_catalog_airflow/local_postgres/04_openledger_image_view.sql similarity index 100% rename from src/cc_catalog_airflow/local_postgres/openledger_image_view.sql rename to src/cc_catalog_airflow/local_postgres/04_openledger_image_view.sql diff --git a/src/cc_catalog_airflow/local_postgres/openledger_old_image_schema.sql b/src/cc_catalog_airflow/local_postgres/05_openledger_old_image_schema.sql similarity index 100% rename from src/cc_catalog_airflow/local_postgres/openledger_old_image_schema.sql rename to src/cc_catalog_airflow/local_postgres/05_openledger_old_image_schema.sql diff --git a/src/cc_catalog_airflow/local_postgres/Dockerfile b/src/cc_catalog_airflow/local_postgres/Dockerfile index bdc43da3d..fce37f37c 100644 --- a/src/cc_catalog_airflow/local_postgres/Dockerfile +++ b/src/cc_catalog_airflow/local_postgres/Dockerfile @@ -2,9 +2,9 @@ FROM postgres:13.2 ENV POSTGRES_USER=deploy ENV POSTGRES_PASSWORD=deploy ENV POSTGRES_DB=openledger -ADD ./openledger_image_schema.sql /docker-entrypoint-initdb.d -ADD ./openledger_old_image_schema.sql /docker-entrypoint-initdb.d -ADD ./openledger_image_view.sql /docker-entrypoint-initdb.d -ADD ./aws_s3_mock.sql /docker-entrypoint-initdb.d -ADD ./airflow_user_db.sql /docker-entrypoint-initdb.d +ADD 01_airflow_user_db.sql /docker-entrypoint-initdb.d +ADD 02_aws_s3_mock.sql /docker-entrypoint-initdb.d +ADD 03_openledger_image_schema.sql /docker-entrypoint-initdb.d +ADD 04_openledger_image_view.sql /docker-entrypoint-initdb.d +ADD 05_openledger_old_image_schema.sql /docker-entrypoint-initdb.d RUN apt-get -y update && apt-get -y install python3-boto3 postgresql-plpython3-13