From 91ce4316bf02aeaef55f0f98aa133b0a8146c6c3 Mon Sep 17 00:00:00 2001 From: KonstantAnxiety Date: Fri, 22 Nov 2024 12:43:32 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20BI-0=20add=20US=20PG=20healthcheck=20in?= =?UTF-8?q?=20test=20compose=20files,=20move=20US=20service=E2=80=A6=20(#7?= =?UTF-8?q?25)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: BI-0 add US PG healthcheck in test compose files, move US service to common compose * Remove unused x-constants * remove override in dl_api_lib * fix override in dl_api_lib * fix it finally --- lib/dl_api_lib/dl_api_lib_tests/db/config.py | 6 +-- lib/dl_api_lib/docker-compose.yml | 29 ++++----------- lib/dl_connector_bigquery/docker-compose.yml | 27 +++----------- .../docker-compose.yml | 27 +++----------- .../docker-compose.yml | 31 ++++------------ .../docker-compose.yml | 27 +++----------- lib/dl_connector_greenplum/docker-compose.yml | 27 +++----------- lib/dl_connector_metrica/docker-compose.yml | 27 +++----------- lib/dl_connector_mssql/docker-compose.yml | 27 +++----------- lib/dl_connector_mysql/docker-compose.yml | 27 +++----------- lib/dl_connector_oracle/docker-compose.yml | 27 +++----------- .../docker-compose.yml | 27 +++----------- lib/dl_connector_promql/docker-compose.yml | 27 +++----------- lib/dl_connector_snowflake/docker-compose.yml | 27 +++----------- lib/dl_connector_ydb/docker-compose.yml | 27 +++----------- lib/dl_core/docker-compose.yml | 27 +++----------- .../docker-compose.yml | 28 +++----------- .../docker-compose.yml | 28 +++----------- lib/testenv-common/docker-compose.common.yml | 37 +++++++++++++++++++ 19 files changed, 144 insertions(+), 366 deletions(-) create mode 100644 lib/testenv-common/docker-compose.common.yml diff --git a/lib/dl_api_lib/dl_api_lib_tests/db/config.py b/lib/dl_api_lib/dl_api_lib_tests/db/config.py index 84c30bc6b..70014bbc2 100644 --- a/lib/dl_api_lib/dl_api_lib_tests/db/config.py +++ b/lib/dl_api_lib/dl_api_lib_tests/db/config.py @@ -16,13 +16,13 @@ CORE_TEST_CONFIG = CoreTestEnvironmentConfiguration( host_us_http=get_test_container_hostport("us", fallback_port=52500).host, port_us_http=get_test_container_hostport("us", fallback_port=52500).port, - host_us_pg=get_test_container_hostport("db-postgres", fallback_port=52509).host, - port_us_pg_5432=get_test_container_hostport("db-postgres", fallback_port=52509).port, + host_us_pg=get_test_container_hostport("pg-us", fallback_port=52509).host, + port_us_pg_5432=get_test_container_hostport("pg-us", fallback_port=52509).port, us_master_token="AC1ofiek8coB", core_connector_ep_names=["clickhouse", "postgresql"], compeng_url=( f"postgresql://us:us@" - f'{get_test_container_hostport("db-postgres", fallback_port=52509).as_pair()}/us-db-ci_purgeable' + f'{get_test_container_hostport("pg-us", fallback_port=52509).as_pair()}/us-db-ci_purgeable' ), redis_host=get_test_container_hostport("redis-caches").host, redis_port=get_test_container_hostport("redis-caches", fallback_port=52505).port, diff --git a/lib/dl_api_lib/docker-compose.yml b/lib/dl_api_lib/docker-compose.yml index 78b80dd8f..2550081f3 100644 --- a/lib/dl_api_lib/docker-compose.yml +++ b/lib/dl_api_lib/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: redis-caches: # image: "bitnami/redis:5.0.8" @@ -21,28 +18,16 @@ services: dockerfile: Dockerfile.db-clickhouse # PostgreSQL is used both for US and COMPENG - db-postgres: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + pg-us: + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "52509:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - db-postgres - environment: - POSTGRES_DSN_LIST: "postgres://us:us@db-postgres:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "52500:8083" diff --git a/lib/dl_connector_bigquery/docker-compose.yml b/lib/dl_connector_bigquery/docker-compose.yml index 97ba52e11..308650cb9 100644 --- a/lib/dl_connector_bigquery/docker-compose.yml +++ b/lib/dl_connector_bigquery/docker-compose.yml @@ -1,34 +1,19 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "51609:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "51600:8083" diff --git a/lib/dl_connector_bitrix_gds/docker-compose.yml b/lib/dl_connector_bitrix_gds/docker-compose.yml index 23b485ccf..a9bd55e73 100644 --- a/lib/dl_connector_bitrix_gds/docker-compose.yml +++ b/lib/dl_connector_bitrix_gds/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: # COMPENG db-postgres-13: @@ -18,27 +15,15 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "51910:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "51911:8083" diff --git a/lib/dl_connector_bundle_chs3/docker-compose.yml b/lib/dl_connector_bundle_chs3/docker-compose.yml index 6ca083f6a..b700d4ca0 100644 --- a/lib/dl_connector_bundle_chs3/docker-compose.yml +++ b/lib/dl_connector_bundle_chs3/docker-compose.yml @@ -1,15 +1,10 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - REDIS_PASSWORD: &c-redis-password "AwockEuvavDyinmeakmiRiopanbesBepsensUrdIz5" - - services: redis: image: "bitnami/redis:5.0.8@sha256:3127620da977815556439a9dc347fff89432a79b6bb6e93a16f20ac4a34ce337" environment: - REDIS_PASSWORD: *c-redis-password + REDIS_PASSWORD: AwockEuvavDyinmeakmiRiopanbesBepsensUrdIz5 ports: - 52604:6379 @@ -33,27 +28,15 @@ services: - 52620:8000 pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - 52609:5432 us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - 52600:8083 - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token diff --git a/lib/dl_connector_clickhouse/docker-compose.yml b/lib/dl_connector_clickhouse/docker-compose.yml index 49a7a75e9..174dfa49f 100644 --- a/lib/dl_connector_clickhouse/docker-compose.yml +++ b/lib/dl_connector_clickhouse/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: db-clickhouse-21-8: ports: @@ -33,28 +30,16 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "52210:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "52211:8083" diff --git a/lib/dl_connector_greenplum/docker-compose.yml b/lib/dl_connector_greenplum/docker-compose.yml index b6b7bb35f..858fdb1b6 100644 --- a/lib/dl_connector_greenplum/docker-compose.yml +++ b/lib/dl_connector_greenplum/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: # yes, greenplum tests run on a postgres db db-postgres-13: @@ -18,28 +15,16 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "52310:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "52311:8083" diff --git a/lib/dl_connector_metrica/docker-compose.yml b/lib/dl_connector_metrica/docker-compose.yml index 6cad43597..a16cc1dab 100644 --- a/lib/dl_connector_metrica/docker-compose.yml +++ b/lib/dl_connector_metrica/docker-compose.yml @@ -1,32 +1,17 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "51910:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "51911:8083" diff --git a/lib/dl_connector_mssql/docker-compose.yml b/lib/dl_connector_mssql/docker-compose.yml index c01e27368..e23cb2fbc 100644 --- a/lib/dl_connector_mssql/docker-compose.yml +++ b/lib/dl_connector_mssql/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: db-mssql-14: labels: @@ -18,28 +15,16 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "52110:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "52111:8083" diff --git a/lib/dl_connector_mysql/docker-compose.yml b/lib/dl_connector_mysql/docker-compose.yml index 61c9d356d..aecf1174a 100644 --- a/lib/dl_connector_mysql/docker-compose.yml +++ b/lib/dl_connector_mysql/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: db-mysql-5-7: # the earliest version supported by DL @@ -30,28 +27,16 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "52010:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "52011:8083" diff --git a/lib/dl_connector_oracle/docker-compose.yml b/lib/dl_connector_oracle/docker-compose.yml index 69343ed93..828014fc3 100644 --- a/lib/dl_connector_oracle/docker-compose.yml +++ b/lib/dl_connector_oracle/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: db-oracle: labels: @@ -18,28 +15,16 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "51810:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "51811:8083" diff --git a/lib/dl_connector_postgresql/docker-compose.yml b/lib/dl_connector_postgresql/docker-compose.yml index f048b02df..b9e712835 100644 --- a/lib/dl_connector_postgresql/docker-compose.yml +++ b/lib/dl_connector_postgresql/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: db-postgres-9-3: build: @@ -44,28 +41,16 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "52310:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "52311:8083" diff --git a/lib/dl_connector_promql/docker-compose.yml b/lib/dl_connector_promql/docker-compose.yml index bb9aa004a..22d28687c 100644 --- a/lib/dl_connector_promql/docker-compose.yml +++ b/lib/dl_connector_promql/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: prometheus-node-exporter: build: @@ -22,27 +19,15 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "51910:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "51911:8083" diff --git a/lib/dl_connector_snowflake/docker-compose.yml b/lib/dl_connector_snowflake/docker-compose.yml index 7ce3d1d8c..66e90f698 100644 --- a/lib/dl_connector_snowflake/docker-compose.yml +++ b/lib/dl_connector_snowflake/docker-compose.yml @@ -1,34 +1,19 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "51709:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "51700:8083" diff --git a/lib/dl_connector_ydb/docker-compose.yml b/lib/dl_connector_ydb/docker-compose.yml index be7728f76..e5a153027 100644 --- a/lib/dl_connector_ydb/docker-compose.yml +++ b/lib/dl_connector_ydb/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: db-ydb: image: "cr.yandex/yc/yandex-docker-local-ydb:latest" @@ -15,27 +12,15 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "51910:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "51911:8083" diff --git a/lib/dl_core/docker-compose.yml b/lib/dl_core/docker-compose.yml index d63834fba..73ef9a774 100644 --- a/lib/dl_core/docker-compose.yml +++ b/lib/dl_core/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: db-clickhouse: ports: @@ -22,27 +19,15 @@ services: # INFRA pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - "50309:5432" us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "required" - MASTER_TOKEN: *c-us-master-token + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - "50300:8083" diff --git a/lib/dl_file_uploader_api_lib/docker-compose.yml b/lib/dl_file_uploader_api_lib/docker-compose.yml index 0dfbf1296..6f13199cf 100644 --- a/lib/dl_file_uploader_api_lib/docker-compose.yml +++ b/lib/dl_file_uploader_api_lib/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: redis: # image: "bitnami/redis:5.0.8" @@ -35,31 +32,18 @@ services: - "51408:8000" pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - 51409:5432 us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - 51400:8083 - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "disabled" - MULTITENANT: "false" - MASTER_TOKEN: *c-us-master-token zookeeper-1: # image: "zookeeper:3.4" diff --git a/lib/dl_file_uploader_worker_lib/docker-compose.yml b/lib/dl_file_uploader_worker_lib/docker-compose.yml index 785441969..0ca78e692 100644 --- a/lib/dl_file_uploader_worker_lib/docker-compose.yml +++ b/lib/dl_file_uploader_worker_lib/docker-compose.yml @@ -1,8 +1,5 @@ version: '3.7' -x-constants: - US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" - services: redis: # image: "bitnami/redis:5.0.8" @@ -35,31 +32,18 @@ services: - "51508:8000" pg-us: - build: - context: ../testenv-common/images - dockerfile: Dockerfile.pg-us - environment: - POSTGRES_DB: us-db-ci_purgeable - POSTGRES_USER: us - POSTGRES_PASSWORD: us + extends: + file: ../testenv-common/docker-compose.common.yml + service: pg-us ports: - 51509:5432 us: - labels: - datalens.ci.service: united-storage - build: - context: ../testenv-common/images - dockerfile: Dockerfile.us + extends: + file: ../testenv-common/docker-compose.common.yml + service: us ports: - 51500:8083 - depends_on: - - pg-us - environment: - POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" - AUTH_POLICY: "disabled" - MULTITENANT: "false" - MASTER_TOKEN: *c-us-master-token zookeeper-1: # image: "zookeeper:3.4" diff --git a/lib/testenv-common/docker-compose.common.yml b/lib/testenv-common/docker-compose.common.yml new file mode 100644 index 000000000..383601503 --- /dev/null +++ b/lib/testenv-common/docker-compose.common.yml @@ -0,0 +1,37 @@ +version: '3.7' + +x-constants: + US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB" + +services: + pg-us: + build: + context: ./images + dockerfile: Dockerfile.pg-us + environment: + POSTGRES_DB: us-db-ci_purgeable + POSTGRES_USER: us + POSTGRES_PASSWORD: us + healthcheck: + test: ["CMD", "pg_isready", "-d", "us-db-ci_purgeable"] + interval: 5s + retries: 10 + start_period: 3s + ports: + - "50009:5432" + + us: + labels: + datalens.ci.service: united-storage + build: + context: ./images + dockerfile: Dockerfile.us + depends_on: + pg-us: + condition: service_healthy + environment: + POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable" + AUTH_POLICY: "required" + MASTER_TOKEN: *c-us-master-token + ports: + - "50000:8083"