feat(cdash): CI Scripts 07/37607/4
authorpmikus <peter.mikus@protonmail.ch>
Wed, 9 Nov 2022 13:22:00 +0000 (13:22 +0000)
committerPeter Mikus <peter.mikus@protonmail.ch>
Wed, 9 Nov 2022 14:41:12 +0000 (14:41 +0000)
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: I857265b1f63fb795d5efbb312777edebe700a49a

csit.infra.dash/do_release.sh
csit.infra.dash/do_run.sh
csit.infra.dash/docker-compose.yaml

index d4e935b..ddf0eae 100755 (executable)
@@ -8,5 +8,6 @@ rm -f app.zip
 
 pushd app
 find . -type d -name "__pycache__" -exec rm -rf "{}" \; || true
 
 pushd app
 find . -type d -name "__pycache__" -exec rm -rf "{}" \; || true
+find . -type d -name ".webassets-cache" -exec rm -rf "{}" \; || true
 zip -r ../app.zip .
 popd
 zip -r ../app.zip .
 popd
index 6b44864..843156b 100755 (executable)
@@ -2,13 +2,9 @@
 
 set -exuo pipefail
 
 
 set -exuo pipefail
 
-command -v docker-compose || exit 1
+command -v docker || exit 1
 
 
-#export UID=$(id -u)
-#export GID=$(id -g)
+export UID=$(id -u)
+export GID=$(id -g)
 
 
-docker-compose run \
-    --user $(id -u):$(id -g) \
-    --publish 5000 \
-    --publish 9001 \
-    dash
+docker compose up --remove-orphans
index e2259b8..7a5288b 100644 (file)
@@ -1,16 +1,15 @@
 version: "3.7"
 services:
 version: "3.7"
 services:
-  dash:
+  cdash:
     build: "."
     command: "uwsgi --ini app.ini --workers 1"
     depends_on:
       - "minio"
     build: "."
     command: "uwsgi --ini app.ini --workers 1"
     depends_on:
       - "minio"
-    environment:
-      AWS_ACCESS_KEY_ID: ""
-      AWS_SECRET_ACCESS_KEY: ""
-    ports:
-      - "5000"
+      - "mc"
     mem_limit: "4g"
     mem_limit: "4g"
+    ports:
+      - "5000:5000"
+    user: "${UID}:${GID}"
     volumes:
       - "${PWD}/app/:/app"
       - "${PWD}/../resources/libraries/python/jumpavg/:/app/cdash/jumpavg"
     volumes:
       - "${PWD}/app/:/app"
       - "${PWD}/../resources/libraries/python/jumpavg/:/app/cdash/jumpavg"
@@ -20,16 +19,29 @@ services:
     command: server --console-address ":9001" /data
     expose:
       - "9000"
     command: server --console-address ":9001" /data
     expose:
       - "9000"
-      - "9001"
     environment:
       MINIO_ROOT_USER: "minioadmin"
       MINIO_ROOT_PASSWORD: "minioadmin"
     healthcheck:
     environment:
       MINIO_ROOT_USER: "minioadmin"
       MINIO_ROOT_PASSWORD: "minioadmin"
     healthcheck:
-      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
+      test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
       interval: "30s"
       timeout: "20s"
       retries: 3
       interval: "30s"
       timeout: "20s"
       retries: 3
+    ports:
+      - "9001:9001"
     volumes:
       - "data:/data"
     volumes:
       - "data:/data"
+  mc:
+    image: "quay.io/minio/mc:RELEASE.2022-11-07T23-47-39Z"
+    depends_on:
+      - "minio"
+    entrypoint: >
+      /bin/sh -c "
+      /usr/bin/mc config host rm local;
+      /usr/bin/mc config host add --quiet --api s3v4 local http://minio:9000 minioadmin minioadmin;
+      /usr/bin/mc mb --quiet --ignore-existing local/fdio-docs-s3-cloudfront-index/;
+      /usr/bin/mc anonymous set public local/fdio-docs-s3-cloudfront-index;
+      "
 volumes:
 volumes:
-  data:
\ No newline at end of file
+  data:
+#    external: true