Skip to content

Commit

Permalink
lug: support secret values in lug config
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotonQuantum committed Feb 15, 2024
1 parent 03bd84e commit 44c19ed
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ services:
args:
- USE_SJTUG=false
volumes:
- "./lug/config.local.yaml:/config.local.yaml:ro"
command: -c /config.local.yaml
- "./lug/config.local.yaml:/config/0-base.yaml:ro"
caddy:
build:
args:
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.siyuan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ services:
container_name: siyuan-lug
volumes:
- "/mnt/data32T:/srv/data32T"
- "./config.siyuan.yaml:/config.yaml:ro"
- "./config.siyuan.yaml:/config/0-base.yaml:ro"
- "./secrets/secrets.siyuan.yaml:/config/99-secrets.yaml:ro"
environment:
MIRROR_CLONE_SITE: "mirror.sjtu.edu.cn"
mem_limit: 30G
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.zhiyuan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ services:
container_name: zhiyuan-lug
volumes:
- "/mnt/data12T:/mnt"
- "./config.zhiyuan.yaml:/config.yaml:ro"
- "./config.zhiyuan.yaml:/config/0-base.yaml:ro"
- "./secrets/secrets.zhiyuan.yaml:/config/99-secrets.yaml:ro"
environment:
MIRROR_CLONE_SITE: "mirrors.sjtug.sjtu.edu.cn"
mem_limit: 10G
Expand Down
4 changes: 3 additions & 1 deletion lug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,6 @@ RUN mkdir rsync_sjtug && cd rsync_sjtug && /app/build-script/from-cache.sh \
tmp.tar.gz \
&& tar -xvf tmp.tar.gz && rm tmp.tar.gz

ENTRYPOINT ["./lug"]
COPY entrypoint.sh ./entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]
5 changes: 5 additions & 0 deletions lug/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

yq ea '. as $item ireduce ({}; . * $item )' /config/*.yaml | sed 's/!!merge //g' > config.merged.yaml

./lug -c config.merged.yaml

0 comments on commit 44c19ed

Please sign in to comment.