From ffe1e4b095cff9dcd9b646a28d945917301a5aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Thu, 22 Aug 2024 10:23:22 +0100 Subject: [PATCH] Avoid using repo as volume (#59) * Add volume to the container * Use volume from container * version is obsolete now See https://github.com/compose-spec/compose-spec/blob/main/04-version-and-name.md#version-top-level-element-obsolete * Also add the layout in the initial config --- Dockerfile | 7 ++++++- assets/config.yml | 5 +++++ docker-compose.yaml | 12 +++--------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2f30a47..1b42913 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM python:3.10 # Do not get picky on exact cron version so ignore DL3008 # hadolint ignore=DL3008 RUN apt-get update \ - && apt-get install --no-install-recommends -y cron \ + && apt-get install --no-install-recommends -y cron tini \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && rm /etc/cron.daily/* @@ -19,4 +19,9 @@ COPY ./dashboard /fedcloud-dashboard/dashboard WORKDIR /fedcloud-dashboard +COPY ./assets /www/assets + +VOLUME /www/assets + +ENTRYPOINT ["tini", "--"] CMD ["cron", "-f"] diff --git a/assets/config.yml b/assets/config.yml index 158cd4a..6b0a508 100644 --- a/assets/config.yml +++ b/assets/config.yml @@ -15,11 +15,16 @@ theme: classic # Will load custom CSS files. Especially useful for custom icon sets. stylesheet: - "assets/egi.css" + colors: light: highlight-secondary: "#005faa" highlight-hover: "#ef8200" +defaults: + layout: list + colorTheme: auto + message: style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options. title: "Provider dashboards" diff --git a/docker-compose.yaml b/docker-compose.yaml index 8f0da26..e233e36 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,4 @@ -version: "3.3" - services: - traefik: image: "traefik:v2.11" container_name: "traefik" @@ -31,7 +28,6 @@ services: restart_policy: condition: any - dashboard: image: "b4bz/homer:v24.05.1" labels: @@ -39,18 +35,16 @@ services: - "traefik.http.routers.dashboard.rule=HostRegexp(`{any:.+}`)" - "traefik.http.routers.dashboard.entrypoints=websecure" - "traefik.http.routers.dashboard.tls.certresolver=myresolver" - volumes: - - "/fedcloud-dashboard/assets:/www/assets/" + volumes_from: + - endpoint_updater environment: - - INIT_ASSETS=1 + - INIT_ASSETS=0 deploy: restart_policy: condition: any endpoint_updater: build: . - volumes: - - "/fedcloud-dashboard/assets:/www/assets/" deploy: restart_policy: condition: any