diff --git a/.gitignore b/.gitignore index 4a73b67..b8b7638 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ + # すべてのファイルとディレクトリを無視 * # ".pub" を含むファイルを 無視対象から除外 @@ -9,3 +10,5 @@ !/* !.github/** + +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cbb6ae3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM ghcr.io/toro-server/toro-configs-enforcer:latest + +WORKDIR /app + +COPY /main /app/main diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..adc87a2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + main: + image: ghcr.io/toro-server/toro-configs-enforcer:latest + container_name: toro-configs-main + env_file: + - .env + volumes: + - ./main:/app/main diff --git a/main/plugins/AddPerm/config.pub.yml b/main/plugins/AddPerm/config.pub.yml index d23b427..e59a86b 100644 --- a/main/plugins/AddPerm/config.pub.yml +++ b/main/plugins/AddPerm/config.pub.yml @@ -1 +1 @@ -webhook-url: "[[ADDPERM:DISCORD_WEBHOOK]]" +webhook-url: "[[ADDPERM_DISCORD_WEBHOOK]]" diff --git a/main/plugins/BanPlayerSheet/config.pub.yml b/main/plugins/BanPlayerSheet/config.pub.yml index c8b75af..3bcd936 100644 --- a/main/plugins/BanPlayerSheet/config.pub.yml +++ b/main/plugins/BanPlayerSheet/config.pub.yml @@ -1,4 +1,4 @@ -URL: "[[BANPLAYERSHEET:API_URL]]" +URL: "[[BANPLAYERSHEET_API_URL]]" Message: BanReason: "BAN 理由" diff --git a/main/plugins/BungeeGuard/config.pub.yml b/main/plugins/BungeeGuard/config.pub.yml index b3dfce8..d9a13dd 100644 --- a/main/plugins/BungeeGuard/config.pub.yml +++ b/main/plugins/BungeeGuard/config.pub.yml @@ -2,7 +2,7 @@ # Allowed authentication tokens. allowed-tokens: - - "[[BUNGEEGUARD:ALLOWED_TOKENS]]" + - "[[BUNGEEGUARD_ALLOWED_TOKENS]]" # Messages diff --git a/main/plugins/DiscordSRV/config.pub.yml b/main/plugins/DiscordSRV/config.pub.yml index 32600e1..471ba7e 100644 --- a/main/plugins/DiscordSRV/config.pub.yml +++ b/main/plugins/DiscordSRV/config.pub.yml @@ -6,7 +6,7 @@ ConfigVersion: 1.27.0 # Bot token; don't know what this is? Look at the video on the plugin page for instructions # You must restart your server after changing this option -BotToken: "[[DISCORDSRV:BOT_TOKEN]]" +BotToken: "[[DISCORDSRV_BOT_TOKEN]]" # Channel links from game to Discord # syntax is Channels: {"in-game channel name from Minecraft": "numerical channel ID from Discord", "another in-game channel name from Minecraft": "another numerical channel ID from Discord"} @@ -27,10 +27,10 @@ BotToken: "[[DISCORDSRV:BOT_TOKEN]]" # # The first part of channel pairs is not the Discord channel name! # Run "/discord reload" after changing this option to apply -Channels: [[DISCORDSRV:CHANNELS]] +Channels: {"global": "[[DISCORDSRV_CHANNELS]]"} # Console channel numerical ID (NOT NAME), leave blank to disable the console channel all together -DiscordConsoleChannelId: "[[DISCORDSRV:CONSOLE_CHANNEL_ID]]" +DiscordConsoleChannelId: "[[DISCORDSRV_CONSOLE_CHANNEL_ID]]" # Invitation link shown to players when using /discord and on the message shown to unlinked players when linking is enforced DiscordInviteLink: "https://discord.gg/changethisintheconfig.yml" diff --git a/main/plugins/Tps_log/config.pub.yml b/main/plugins/Tps_log/config.pub.yml index 77ab669..d5c97f8 100644 --- a/main/plugins/Tps_log/config.pub.yml +++ b/main/plugins/Tps_log/config.pub.yml @@ -17,7 +17,7 @@ MaxTPS: 20 WarnTPS: 18 #Discord Webhook -WebhookURL: "[[TPSLOG:DISCORD_WEBHOOK]]" +WebhookURL: "[[TPSLOG_DISCORD_WEBHOOK]]" #Discord Embed Color EmbedColor: 12915218 Discord: true diff --git a/secrets.json b/secrets.json deleted file mode 100644 index a16c987..0000000 --- a/secrets.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - "ADDPERM:DISCORD_WEBHOOK", - "BANPLAYERSHEET:API_URL", - "BUNGEEGUARD:ALLOWED_TOKENS", - "DISCORDSRV:BOT_TOKEN", - "DISCORDSRV:CHANNELS", - "DISCORDSRV:CONSOLE_CHANNEL_ID", - "TPSLOG:DISCORD_WEBHOOK" -] \ No newline at end of file diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..201f682 --- /dev/null +++ b/update.sh @@ -0,0 +1,9 @@ +#!/bin/bash +cd $(dirname $0) + +git fetch origin main +git reset --hard origin/main + +docker compose pull +docker compose up +docker compose down