malt666 commited on
Commit
1d6f28b
·
verified ·
1 Parent(s): eef1105

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile CHANGED
@@ -161,6 +161,24 @@ ENTRYPOINT ["tini", "--", "sh", "-c", " \
161
  fi; \
162
  # --- END: Dynamically Install Plugins at Runtime --- \
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  # --- BEGIN: Dynamically Install Extensions at Runtime --- \
165
  echo '--- Checking for EXTENSIONS environment variable ---'; \
166
  if [ -n \"$EXTENSIONS\" ]; then \
 
161
  fi; \
162
  # --- END: Dynamically Install Plugins at Runtime --- \
163
 
164
+ # --- BEGIN: Auto-configure cloud-saves plugin if secrets provided --- \
165
+ echo '--- Checking for cloud-saves plugin auto-configuration ---'; \
166
+ if [ -d \"./plugins/cloud-saves\" ] && [ -n \"$REPO_URL\" ] && [ -n \"$GITHUB_TOKEN\" ]; then \
167
+ echo \"*** Auto-configuring cloud-saves plugin with provided secrets ***\" && \
168
+ config_file=\"./plugins/cloud-saves/config.json\" && \
169
+ echo \"--- Creating config.json for cloud-saves plugin at $config_file ---\" && \
170
+ printf '{\\n \"repo_url\": \"%s\",\\n \"branch\": \"main\",\\n \"username\": \"\",\\n \"github_token\": \"%s\",\\n \"display_name\": \"user\",\\n \"is_authorized\": true,\\n \"last_save\": null,\\n \"current_save\": null,\\n \"has_temp_stash\": false,\\n \"autoSaveEnabled\": false,\\n \"autoSaveInterval\": 30,\\n \"autoSaveTargetTag\": \"\"\\n}\\n' \"$REPO_URL\" \"$GITHUB_TOKEN\" > \"$config_file\" && \
171
+ chown node:node \"$config_file\" && \
172
+ echo \"*** cloud-saves plugin auto-configuration completed ***\"; \
173
+ else \
174
+ if [ ! -d \"./plugins/cloud-saves\" ]; then \
175
+ echo 'cloud-saves plugin not found, skipping auto-configuration.'; \
176
+ elif [ -z \"$REPO_URL\" ] || [ -z \"$GITHUB_TOKEN\" ]; then \
177
+ echo 'REPO_URL or GITHUB_TOKEN environment variables not provided, skipping cloud-saves auto-configuration.'; \
178
+ fi; \
179
+ fi; \
180
+ # --- END: Auto-configure cloud-saves plugin --- \
181
+
182
  # --- BEGIN: Dynamically Install Extensions at Runtime --- \
183
  echo '--- Checking for EXTENSIONS environment variable ---'; \
184
  if [ -n \"$EXTENSIONS\" ]; then \