From 715b6b65c8b8c717fb8a0c7f5d50c99a2c303a81 Mon Sep 17 00:00:00 2001 From: Valentin Matton Date: Thu, 28 Sep 2023 13:08:46 +0200 Subject: [PATCH] chore: move compose file --- deployment/{docker => }/docker-compose.yml | 10 +++++----- deployment/modules/stack_data/main.tf | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) rename deployment/{docker => }/docker-compose.yml (95%) diff --git a/deployment/docker/docker-compose.yml b/deployment/docker-compose.yml similarity index 95% rename from deployment/docker/docker-compose.yml rename to deployment/docker-compose.yml index 1776d9786..4c17dab95 100644 --- a/deployment/docker/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -4,7 +4,7 @@ name: "data-inclusion" x-airflow-common: &airflow-common build: - context: ../../pipeline + context: ../pipeline environment: &airflow-common-environment @@ -38,10 +38,10 @@ x-airflow-common: volumes: - airflow-logs:/opt/airflow/logs - - ./../../pipeline/dbt:/opt/airflow/dbt - - ./../../pipeline/dags:/opt/airflow/dags - - ./../../pipeline/logs:/opt/airflow/logs - - ./../../pipeline/src:/opt/airflow/data-inclusion/src + - ./../pipeline/dbt:/opt/airflow/dbt + - ./../pipeline/dags:/opt/airflow/dags + - ./../pipeline/logs:/opt/airflow/logs + - ./../pipeline/src:/opt/airflow/data-inclusion/src user: 0:0 diff --git a/deployment/modules/stack_data/main.tf b/deployment/modules/stack_data/main.tf index b9f99bef7..d3643eb50 100644 --- a/deployment/modules/stack_data/main.tf +++ b/deployment/modules/stack_data/main.tf @@ -162,7 +162,7 @@ resource "null_resource" "up" { provisioner "remote-exec" { inline = [ "rm -rf ${local.work_dir}", - "mkdir -p ${local.work_dir}/deployment/docker", + "mkdir -p ${local.work_dir}/deployment", ] } @@ -187,24 +187,24 @@ resource "null_resource" "up" { SIRENE_STOCK_UNITE_LEGALE_FILE_URL=https://www.data.gouv.fr/fr/datasets/r/825f4199-cadd-486c-ac46-a65a8ea1a047 EOT ) - destination = "${local.work_dir}/deployment/docker/.env" + destination = "${local.work_dir}/deployment/.env" } provisioner "file" { - source = "${path.module}/../../../pipeline" + source = "${path.root}/../pipeline" destination = "${local.work_dir}/" } provisioner "file" { - source = "${path.module}/../../docker" - destination = "${local.work_dir}/deployment/" + source = "${path.root}/../deployment/docker-compose.yml" + destination = "${local.work_dir}/deployment/docker-compose.yml" } provisioner "remote-exec" { inline = [ - "cd ${local.work_dir}/deployment/docker", + "cd ${local.work_dir}/deployment", "docker compose up --quiet-pull --detach 2>&1 | cat", - "rm -f ${local.work_dir}/deployment/docker/.env", + "rm -f ${local.work_dir}/deployment/.env", ] } }