21 lines
770 B
YAML
21 lines
770 B
YAML
services:
|
|
tiramisu-config-init:
|
|
image: curlimages/curl:latest
|
|
container_name: tiramisu-config-init
|
|
user: "0:0"
|
|
volumes:
|
|
- /srv/docker/tiramisu:/target
|
|
entrypoint: >
|
|
sh -c "
|
|
if [ -d /target/config.json ]; then
|
|
echo 'config.json is a directory, not a file — removing it';
|
|
rm -rf /target/config.json;
|
|
fi;
|
|
if [ ! -f /target/config.json ] || [ ! -s /target/config.json ]; then
|
|
curl -sSL -o /target/config.json https://raw.githubusercontent.com/MrRobotoGit/tiramisu/main/config.json.example
|
|
echo 'Fetched default config.json — edit /srv/docker/tiramisu/config.json with real values';
|
|
else
|
|
echo 'config.json already exists, skipping fetch';
|
|
fi
|
|
"
|
|
restart: "no" |