Skip to content

Commit

Permalink
Avoid using repo as volume (#59)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
enolfc authored Aug 22, 2024
1 parent 010d13e commit ffe1e4b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand All @@ -19,4 +19,9 @@ COPY ./dashboard /fedcloud-dashboard/dashboard

WORKDIR /fedcloud-dashboard

COPY ./assets /www/assets

VOLUME /www/assets

ENTRYPOINT ["tini", "--"]
CMD ["cron", "-f"]
5 changes: 5 additions & 0 deletions assets/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 3 additions & 9 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
version: "3.3"

services:

traefik:
image: "traefik:v2.11"
container_name: "traefik"
Expand Down Expand Up @@ -31,26 +28,23 @@ services:
restart_policy:
condition: any


dashboard:
image: "b4bz/homer:v24.05.1"
labels:
- "traefik.enable=true"
- "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
Expand Down

0 comments on commit ffe1e4b

Please sign in to comment.