Skip to content

Commit ffe1e4b

Browse files
authored
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
1 parent 010d13e commit ffe1e4b

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM python:3.10
44
# Do not get picky on exact cron version so ignore DL3008
55
# hadolint ignore=DL3008
66
RUN apt-get update \
7-
&& apt-get install --no-install-recommends -y cron \
7+
&& apt-get install --no-install-recommends -y cron tini \
88
&& apt-get clean \
99
&& rm -rf /var/lib/apt/lists/* \
1010
&& rm /etc/cron.daily/*
@@ -19,4 +19,9 @@ COPY ./dashboard /fedcloud-dashboard/dashboard
1919

2020
WORKDIR /fedcloud-dashboard
2121

22+
COPY ./assets /www/assets
23+
24+
VOLUME /www/assets
25+
26+
ENTRYPOINT ["tini", "--"]
2227
CMD ["cron", "-f"]

assets/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@ theme: classic
1515
# Will load custom CSS files. Especially useful for custom icon sets.
1616
stylesheet:
1717
- "assets/egi.css"
18+
1819
colors:
1920
light:
2021
highlight-secondary: "#005faa"
2122
highlight-hover: "#ef8200"
2223

24+
defaults:
25+
layout: list
26+
colorTheme: auto
27+
2328
message:
2429
style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options.
2530
title: "Provider dashboards"

docker-compose.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
version: "3.3"
2-
31
services:
4-
52
traefik:
63
image: "traefik:v2.11"
74
container_name: "traefik"
@@ -31,26 +28,23 @@ services:
3128
restart_policy:
3229
condition: any
3330

34-
3531
dashboard:
3632
image: "b4bz/homer:v24.05.1"
3733
labels:
3834
- "traefik.enable=true"
3935
- "traefik.http.routers.dashboard.rule=HostRegexp(`{any:.+}`)"
4036
- "traefik.http.routers.dashboard.entrypoints=websecure"
4137
- "traefik.http.routers.dashboard.tls.certresolver=myresolver"
42-
volumes:
43-
- "/fedcloud-dashboard/assets:/www/assets/"
38+
volumes_from:
39+
- endpoint_updater
4440
environment:
45-
- INIT_ASSETS=1
41+
- INIT_ASSETS=0
4642
deploy:
4743
restart_policy:
4844
condition: any
4945

5046
endpoint_updater:
5147
build: .
52-
volumes:
53-
- "/fedcloud-dashboard/assets:/www/assets/"
5448
deploy:
5549
restart_policy:
5650
condition: any

0 commit comments

Comments
 (0)