diff options
author | pmikus <peter.mikus@protonmail.ch> | 2022-11-08 08:20:33 +0100 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2022-11-09 08:45:29 +0000 |
commit | 6034d72d01c76060e0f0804fd80e6b1308886cd3 (patch) | |
tree | abff3c47f48f39991a0add88009290ef20f60f4d | |
parent | 7a1d31543b8424bb67b4d610bd9c8e17a58fd0f4 (diff) |
feat(dash): CI scripts
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: Ifb8695f4541344b180c23f2b69ae478c83605263
-rwxr-xr-x | csit.infra.dash/do_release.sh (renamed from csit.infra.dash/do-release.sh) | 3 | ||||
-rwxr-xr-x | csit.infra.dash/do_run.sh | 14 | ||||
-rw-r--r-- | csit.infra.dash/docker-compose.yaml | 32 |
3 files changed, 42 insertions, 7 deletions
diff --git a/csit.infra.dash/do-release.sh b/csit.infra.dash/do_release.sh index 7589fc83d7..d4e935b420 100755 --- a/csit.infra.dash/do-release.sh +++ b/csit.infra.dash/do_release.sh @@ -1,4 +1,4 @@ -#!/bin/env bash +#!/usr/bin/env bash set -exuo pipefail @@ -7,5 +7,6 @@ command -v zip || exit 1 rm -f app.zip pushd app +find . -type d -name "__pycache__" -exec rm -rf "{}" \; || true zip -r ../app.zip . popd diff --git a/csit.infra.dash/do_run.sh b/csit.infra.dash/do_run.sh new file mode 100755 index 0000000000..6b448644fd --- /dev/null +++ b/csit.infra.dash/do_run.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -exuo pipefail + +command -v docker-compose || exit 1 + +#export UID=$(id -u) +#export GID=$(id -g) + +docker-compose run \ + --user $(id -u):$(id -g) \ + --publish 5000 \ + --publish 9001 \ + dash diff --git a/csit.infra.dash/docker-compose.yaml b/csit.infra.dash/docker-compose.yaml index ca448fb0a9..e2259b82ba 100644 --- a/csit.infra.dash/docker-compose.yaml +++ b/csit.infra.dash/docker-compose.yaml @@ -1,15 +1,35 @@ -version: "3" +version: "3.7" services: dash: build: "." command: "uwsgi --ini app.ini --workers 1" + depends_on: + - "minio" environment: AWS_ACCESS_KEY_ID: "" AWS_SECRET_ACCESS_KEY: "" ports: - - "5000:5000" + - "5000" + mem_limit: "4g" volumes: - - "./app/:/app" - - "../resources/libraries/python/jumpavg/:/app/cdash/jumpavg" - - "/home/vagrant/.aws:/root/.aws" - working_dir: "/app" + - "${PWD}/app/:/app" + - "${PWD}/../resources/libraries/python/jumpavg/:/app/cdash/jumpavg" + - "${HOME}/.aws:/.aws" + minio: + image: "quay.io/minio/minio:RELEASE.2022-11-08T05-27-07Z" + command: server --console-address ":9001" /data + expose: + - "9000" + - "9001" + environment: + MINIO_ROOT_USER: "minioadmin" + MINIO_ROOT_PASSWORD: "minioadmin" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] + interval: "30s" + timeout: "20s" + retries: 3 + volumes: + - "data:/data" +volumes: + data:
\ No newline at end of file |