2 Commits
Author SHA1 Message Date
lamtruong28 6541d6d0fc Disable zoom, select text, auto fill token 2026-11-20 14:20:35 +07:00
lamtruong28 5633bdcc56 Update Readme.md, CheckList.md files 2026-11-18 22:02:26 +07:00
5 changed files with 184 additions and 111 deletions
+19 -19
View File
@@ -2,33 +2,33 @@
VITE_PORT = 3000 VITE_PORT = 3000
VITE_API_BASE_URL = /api/v1/ VITE_API_BASE_URL = /api/v1/
VITE_API_WS_URL = /ws/ VITE_API_WS_URL = /ws/
VITE_SECURITY_CODE = VITE_SECURITY_CODE = "00"
# Backend environments # Backend environments
DEBUG = False DEBUG = False
SECRET_KEY = SECRET_KEY = <ENTER SECRET KEY HERE>
ALLOWED_HOSTS = ALLOWED_HOSTS = localhost,proxy
PER_PAGE_SIZE = PER_PAGE_SIZE = 10
# Database # Database
MYSQL_PORT= MYSQL_PORT=3306
DATABASE_NAME = DATABASE_NAME = walmart_db
DATABASE_USER = DATABASE_USER = root
DATABASE_PASSWORD = DATABASE_PASSWORD = digitoolsolutions
DATABASE_HOST = DATABASE_HOST = mysql
DJANGO_SUPERUSER_USERNAME = DJANGO_SUPERUSER_USERNAME = superadmin
DJANGO_SUPERUSER_EMAIL = DJANGO_SUPERUSER_EMAIL = admin@gmail.com
DJANGO_SUPERUSER_PASSWORD = DJANGO_SUPERUSER_PASSWORD = admin
# Redis # Redis
REDIS_PORT = REDIS_PORT=6379
# Watchtower # Watchtower
WATCHTOWER_HTTP_API_TOKEN = WATCHTOWER_HTTP_API_TOKEN = <ENTER TOKEN HERE>
UPDATE_HOOK_TOKEN = UPDATE_HOOK_TOKEN = <ENTER TOKEN HERE>
WATCHTOWER_URL = WATCHTOWER_URL = http://watchtower:8080/v1/update
# Registry Images # Registry Images
FRONTEND_IMAGE = FRONTEND_IMAGE = gitea.digitoolsolutions.synology.me/dts/tv-walmart-fe:latest
BACKEND_IMAGE = BACKEND_IMAGE = gitea.digitoolsolutions.synology.me/dts/tv-walmart-be:latest
RELEASE_API_URL = RELEASE_API_URL = https://server.digitoolsolutions.synology.me/api/v1/system/release/latest/
+47 -11
View File
@@ -1,6 +1,7 @@
# DTS Torque Vault — Mini PC Kiosk Commissioning & QA Checklist # DTS Torque Vault - Mini PC Kiosk Commissioning & QA Checklist
Use this checklist to verify and sign off each Mini PC after running `setup.bat` / `scripts\install.bat`. Use this checklist after a fresh deployment with `setup.bat` or `scripts\install.bat`.
For maintenance, also complete the Update Verification section after `scripts\update.bat`.
--- ---
@@ -18,10 +19,13 @@ Use this checklist to verify and sign off each Mini PC after running `setup.bat`
## 1. Pre-Deployment & Package Verification ## 1. Pre-Deployment & Package Verification
- [ ] Deployment package extracted locally to `C:\Apps\mini-pc-setup\` (via `setup.bat`, `bootstrap.ps1`, or manual release extraction). - [ ] Deployment package is available locally at `C:\Apps\mini-pc-setup\` (via `setup.bat`) or from the approved extracted release.
- [ ] All required files present: `setup.bat`, `bootstrap.ps1`, `scripts\install.bat`, `scripts\update.bat`, `scripts\uninstall.bat`, `templates\startup.html`, `compose.yml`, `.env`, `README.md`, and `CheckList.md`. - [ ] All required files are present: `setup.bat`, `scripts\install.bat`, `scripts\update.bat`, `scripts\uninstall.bat`, `templates\startup.html`, `compose.yml`, `.env.template`, `.env`, `Readme.md`, and `CheckList.md`.
- [ ] `.env` has been reviewed and contains the intended `FRONTEND_IMAGE`, `BACKEND_IMAGE`, database, Redis, application, and Watchtower values. Production secrets have not been copied into the shared release.
- [ ] `setup.bat` or `scripts\install.bat` was run as Administrator.
- [ ] BIOS Hardware Virtualization (`Intel VT-x` / `AMD-V`) verified as **Enabled**. - [ ] BIOS Hardware Virtualization (`Intel VT-x` / `AMD-V`) verified as **Enabled**.
- [ ] Active LAN / Wi-Fi connection confirmed. - [ ] Active LAN / Wi-Fi connection confirmed.
- [ ] Microsoft Edge is installed in one of the standard 32-bit or 64-bit Program Files locations.
--- ---
@@ -29,33 +33,65 @@ Use this checklist to verify and sign off each Mini PC after running `setup.bat`
_(Sign in as **Administrator** to run these checks if needed)_ _(Sign in as **Administrator** to run these checks if needed)_
- [ ] `Ubuntu-22.04` WSL2 distribution is installed with `systemd=true` in `/etc/wsl.conf` and `vmIdleTimeout=-1` in `%USERPROFILE%\.wslconfig`. - [ ] `Ubuntu-22.04` WSL2 distribution is installed with `systemd=true` in `/etc/wsl.conf` and `vmIdleTimeout=-1` in the installing Administrator's `%USERPROFILE%\.wslconfig`.
- [ ] Docker Engine `28.3.2` and Docker Compose V2 are installed and pinned (`apt-mark hold`). - [ ] Docker Engine package `5:28.3.2-1~ubuntu.22.04~jammy` and Docker Compose V2 are installed; Docker Engine packages are pinned with `apt-mark hold`.
- [ ] All containers in `/opt/walmart` (`-p walmart`) show status **`Up`** (`wsl -d Ubuntu-22.04 -u root bash -c "docker ps"`). - [ ] The `walmart` project runs from `/opt/walmart` and all services show an expected status:
`wsl -d Ubuntu-22.04 -u root docker ps`
- [ ] Container names are expected: `tv-proxy-prod`, `tv-redis-prod`, `tv-db-prod`, `tv-backend-prod`, `tv-frontend-prod`, and `tv-watchtower-prod`.
- [ ] Backend health endpoint `http://localhost:3000/api/v1/system/health-check/` returns **`Online`**. - [ ] Backend health endpoint `http://localhost:3000/api/v1/system/health-check/` returns **`Online`**.
- [ ] Scheduled Task **`WSL Docker Startup`** exists, triggers **At startup**, runs under the **Administrator** account (_Run whether user is logged on or not_, **not** `SYSTEM`), and has **Stop the task if it runs longer than** & **AC power** conditions **unchecked**. - [ ] Scheduled Task **`WSL Docker Startup`** exists, triggers **At startup**, and runs under the installing Administrator account (not `SYSTEM`).
- [ ] The startup task has no execution-time limit and is allowed to restart if it fails.
--- ---
## 3. Kiosk Mode, Auto-Logon & Session Persistence ## 3. Kiosk Mode, Auto-Logon & Session Persistence
- [ ] **Cold Boot / Reboot Test:** Restart the Mini PC and verify it bypasses the Windows login screen and automatically signs into the Kiosk account (`Torque Vault`). - [ ] **Cold Boot / Reboot Test:** Restart the Mini PC and verify it bypasses the Windows login screen and automatically signs into the Kiosk account (`Torque Vault`).
- [ ] **UI Lockdown:** Windows Desktop, Start Menu, and Taskbar are completely hidden; Microsoft Edge launches full-screen on `C:\KioskApp\startup.html` and transitions smoothly into `http://localhost:3000`. - [ ] **UI Lockdown:** The Start Menu and Taskbar are hidden in the kiosk session; Microsoft Edge launches fullscreen from `C:\KioskApp\startup.html` and transitions to `http://localhost:3000`.
- [ ] Edge is launched with a persistent profile under `C:\KioskBrowserData` and InPrivate browsing, browsing-data clearing, and first-run prompts are disabled.
- [ ] **Session Persistence Test:** Log into the web application inside Kiosk mode, reboot the Mini PC, and confirm the browser session/cookies in `C:\KioskBrowserData` remain intact (no forced re-login). - [ ] **Session Persistence Test:** Log into the web application inside Kiosk mode, reboot the Mini PC, and confirm the browser session/cookies in `C:\KioskBrowserData` remain intact (no forced re-login).
- [ ] **Admin Escape Hatch:** Pressing `Ctrl + Alt + Del` → **Switch user** (or turning the display off/on and swiping up the Lock Screen on touch-only kiosks) allows signing into the **Administrator** account with a normal Windows Desktop intact. - [ ] **Admin Escape Hatch:** Pressing `Ctrl + Alt + Del` and switching/signing out allows access to the Administrator account with a normal Windows Desktop.
--- ---
## 4. 24/7 Power, Peripherals & Update Hardening ## 4. 24/7 Power, Peripherals & Update Hardening
- [ ] Active Windows Power Plan is set to **High Performance**. - [ ] Active Windows Power Plan is set to **High Performance**.
- [ ] **Turn off the display**, **Put the computer to sleep**, and **Hibernate** are all set to **Never** (`0`). - [ ] Sleep and hibernation are disabled. The selected display-off timeout is applied (`0` means the display stays on).
- [ ] **USB Selective Suspend** is **Disabled** (`0`). - [ ] **USB Selective Suspend** is **Disabled** (`0`).
- [ ] Disk timeouts are set to **Never** (`0`).
- [ ] Windows is configured not to automatically reboot with the logged-on user for scheduled updates.
- [ ] Connected peripherals (USB dongle, barcode scanner, touchscreen) respond immediately after sitting idle for 15+ minutes. - [ ] Connected peripherals (USB dongle, barcode scanner, touchscreen) respond immediately after sitting idle for 15+ minutes.
- [ ] **Power Loss Recovery Test:** Disconnect AC power (or perform a hard power cycle), reconnect power, and confirm the Mini PC boots directly back into the active Kiosk application without manual intervention. - [ ] **Power Loss Recovery Test:** Disconnect AC power (or perform a hard power cycle), reconnect power, and confirm the Mini PC boots directly back into the active Kiosk application without manual intervention.
--- ---
## 5. Update Verification
Complete this section after running `scripts\update.bat` as Administrator.
- [ ] The current `.env` and `compose.yml` were reviewed and copied/synchronized by the updater.
- [ ] Docker registry login succeeds and the updater completes the image pull.
- [ ] `docker compose -p walmart up -d --remove-orphans` completes successfully.
- [ ] Backend health endpoint returns **`Online`** after the update.
- [ ] `C:\KioskApp\startup.html` is updated when `templates\startup.html` is present.
- [ ] Existing named volumes `tv-data-prod`, `tv-redis-prod`, and `tv-state-prod` are preserved.
- [ ] The application remains usable and required kiosk data/logon are unchanged.
- [ ] Dangling Docker images are pruned and `docker compose -p walmart ps` shows the expected service state.
---
## 6. Troubleshooting Evidence
- [ ] Container status checked:
`wsl -d Ubuntu-22.04 -u root docker ps`
- [ ] Backend logs checked if needed:
`wsl -d Ubuntu-22.04 -u root docker logs tv-backend-prod`
- [ ] Registry login and `FRONTEND_IMAGE` / `BACKEND_IMAGE` values verified if image pull fails.
- [ ] `WSL Docker Startup` Task Scheduler entry verified if the application is unavailable after reboot.
---
## Final Sign-Off ## Final Sign-Off
- [ ] **PASS — Unit approved for production deployment.** - [ ] **PASS — Unit approved for production deployment.**
+67 -70
View File
@@ -1,100 +1,97 @@
# DTS Torque Vault — Mini PC Kiosk 24/7 Deployment # DTS Torque Vault — Mini PC Kiosk Deployment
Automated, zero-touch deployment suite for provisioning Windows 10/11 Mini PCs into dedicated 24/7 Kiosk terminals running **DTS Torque Vault** on WSL2 (`Ubuntu-22.04`) and Docker Engine. Deployment and maintenance guide for Windows Mini PCs running DTS Torque Vault in Edge kiosk mode, with the application stack hosted by Docker Engine inside WSL2.
--- ## Repository contents
## Repository Structure
```text
mini-pc-setup/ mini-pc-setup/
├── setup.bat # One-click Windows bootstrapper (downloads & extracts latest release) ├── setup.bat # Downloads and extracts the latest Gitea release
├── bootstrap.ps1 # PowerShell release downloader & .env initializer ├── compose.yml # Docker Compose stack (project name: walmart)
├── compose.yml # Docker Compose service definitions (project: walmart) ├── .env.template # Sample configuration used to create .env
├── .env.template # Environment variable template (copied to .env if missing) ├── CheckList.md # Commissioning and QA checklist
├── README.md # Deployment & maintenance guide
├── scripts/ ├── scripts/
│ ├── install.bat # Master 7-phase Kiosk & WSL2/Docker installer │ ├── install.bat # Installs and configures WSL2, Docker, and kiosk mode
│ ├── update.bat # Zero-downtime container & image updater (preserves DB volumes) │ ├── update.bat # Pulls images and updates the Compose stack
│ └── uninstall.bat # Full system restore & Kiosk uninstaller (Auto Wipe or Custom) │ └── uninstall.bat # Removes kiosk configuration and/or application data
└── templates/ └── templates/
└── startup.html # Local Kiosk splash/health-check screen before redirecting to :3000 └── startup.html # Local startup screen that waits for the web app
```
--- The installer creates a hidden `.env` file from `.env.template` if `.env` is missing. The sample file is then removed from the deployment directory. Keep `.env` private: it contains application and database settings, including secrets. Docker registry credentials are entered separately at the login prompt.
## Prerequisites ## Requirements
- **OS:** Windows 10 (21H2+) or Windows 11 (64-bit) with **Microsoft Edge** installed. - 64-bit Windows 10 or Windows 11, with Microsoft Edge installed.
- **BIOS / Firmware:** Hardware Virtualization (`Intel VT-x` / `AMD-V`) **Enabled**. - A local Windows Administrator account. Run deployment while signed in to the administrator account that should own the WSL startup task.
- **Privileges:** Local Administrator account on the Mini PC. - CPU virtualization enabled in BIOS/UEFI.
- **Network:** Internet access to download Ubuntu/Docker packages and pull images from `gitea.digitoolsolutions.synology.me`. - Internet access for Gitea, Ubuntu/WSL, Docker packages, and container images.
--- ## Fresh deployment
## Quick Start (Fresh Mini PC Deployment) 1. Run `setup.bat` as Administrator, or extract a release and run `scripts\install.bat` as Administrator.
- `setup.bat` downloads the latest release of `lamtruong28/mini-pc-setup` from `https://gitea.digitoolsolutions.synology.me` and extracts it to `C:\Apps\mini-pc-setup`.
- If the release requires authentication, the bootstrapper prompts for Gitea credentials.
- **Warning:** `setup.bat` deletes the existing `C:\Apps\mini-pc-setup` directory before extracting. Back up any local configuration or files there first.
2. On the first install, review and complete `.env` in Notepad when prompted. Configure the image names and all application, database, Redis, and Watchtower values required by your deployment. Do not put production credentials in a shared release.
3. If WSL2 or `Ubuntu-22.04` is not ready, the installer installs it, creates a logon-triggered resume task, and reboots Windows. Sign back in to the same Administrator account; the installer resumes automatically.
4. Follow the prompts:
- Enter a non-root Linux username and a sudo password for WSL (the suggested username is `gateway`).
- Sign in to the Docker registry when prompted.
- Select a separate Windows kiosk account (default name: `Torque Vault`) and optionally set its password.
- Choose the display-off timeout in minutes (default: 15; enter `0` to keep the display on).
5. At completion, enter `Y` to reboot into kiosk mode.
1. Copy **`setup.bat`** onto the Mini PC (or download it directly from Gitea) and double-click to run it (automatically elevates to Administrator). ## What the installer configures
2. `setup.bat` performs the following automatically:
- Verifies DNS and connectivity to `[https://gitea.digitoolsolutions.synology.me](https://gitea.digitoolsolutions.synology.me)`.
- Fetches the latest published release of `lamtruong28/mini-pc-setup` (prompts for Gitea credentials only if the repository/release is private).
- Extracts all release assets (including hidden files such as `.env`) into **`C:\Apps\mini-pc-setup`**.
- Launches `scripts\install.bat`.
3. **If WSL2 / `Ubuntu-22.04` is not installed yet:**
- Phase 1 installs WSL2 and `Ubuntu-22.04`, registers a `RunOnce` resume entry, and prompts to **reboot** the Mini PC.
- Log back in as Administrator after reboot — `install.bat` resumes automatically.
4. **During installation (`install.bat`):**
- If `.env` does not exist, it is created from `.env.template` and opened in Notepad for configuration.
- Enter your Gitea registry credentials when prompted by `docker login`.
- Choose the Windows Kiosk account name (**Default:** `Torque Vault`) and password (**Default:** blank / no password).
5. When prompted at the end, enter **`Y`** to reboot immediately into **Fullscreen Edge Kiosk Mode**.
--- | Stage | Configuration |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pre-check | Verifies Edge, required configuration files, Internet connectivity, and virtualization; restricts the deployment folder ACLs to Administrators and SYSTEM. |
| WSL2 | Installs/starts `Ubuntu-22.04`, configures the selected Linux user, enables systemd, and sets `vmIdleTimeout=-1` in the administrator's `.wslconfig`. |
| Docker | Installs Docker Engine `5:28.3.2-1~ubuntu.22.04~jammy` and Compose V2; holds Docker Engine packages at the installed version. |
| Application | Copies `compose.yml` and `.env` to `/opt/walmart`, pulls images, starts the `walmart` Compose project, and polls the health endpoint for `Online` (up to 10 attempts, 30 seconds apart). |
| Kiosk account and startup | Configures Windows Auto-Logon and the kiosk user's shell to launch fullscreen Edge using `C:\KioskApp\startup.html`; stores Edge profile data in `C:\KioskBrowserData`. Registers the `WSL Docker Startup` task to start the stack at Windows startup under the installing Administrator account. |
| 24/7 settings | Selects High Performance, disables sleep and hibernation, leaves disk timeouts off, disables USB selective suspend, applies the selected display timeout, and configures Windows Update not to auto-reboot while a user is logged on. |
## What `install.bat` Configures The startup page checks `http://localhost:3000/api/v1/system/health-check/` and redirects to the application when the endpoint responds successfully.
| Phase | Component | Configuration Details | ## Maintenance
| :------------ | :---------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pre-Check** | Environment & Security | Verifies Edge, `compose.yml`, `.env`, `templates\startup.html`, Internet, BIOS Virtualization, and locks `C:\Apps\mini-pc-setup` ACLs to `Administrators` and `SYSTEM`. |
| **Phase 1–2** | WSL2 (`Ubuntu-22.04`) | Installs `Ubuntu-22.04`, creates `dtsadmin` with passwordless `sudo`, enables `systemd=true`, and sets `vmIdleTimeout=-1` in `.wslconfig`. |
| **Phase 3** | Docker Engine | Installs and holds pinned `docker-ce` (`5:28.3.2-1~ubuntu.22.04~jammy`) + `docker-compose-plugin`. |
| **Phase 4** | App Deployment | Deploys stack under `-p walmart` in `/opt/walmart` and polls `http://localhost:3000/api/v1/system/health-check/` every 30s until `"Online"` is returned. |
| **Phase 5–6** | Kiosk Shell & Boot Task | Creates `Torque Vault` user, sets Windows `AutoAdminLogon`, locks user `Shell` policy directly to fullscreen Edge (`C:\KioskApp\startup.html` → `http://localhost:3000`), and registers the **`WSL Docker Startup`** Task Scheduler job (`AtStartup`, `S4U`, unlimited runtime) running `C:\KioskApp\start_wsl_docker.bat`. |
| **Phase 7** | 24/7 Hardening | Activates High Performance power plan, disables sleep/hibernate/display/disk timeouts, and blocks automatic Windows Update reboots while logged on. |
--- ### Update the application
## Maintenance & Operations Run `C:\Apps\mini-pc-setup\scripts\update.bat` as Administrator, preferably after signing out of the kiosk account and into the Administrator account.
### Updating the Application (`scripts\update.bat`) The updater checks WSL and required files, syncs `compose.yml` and `.env` to `/opt/walmart`, prompts for Docker registry login, pulls images, and runs `docker compose -p walmart up -d --remove-orphans`. It then checks the health endpoint and prunes dangling images. The named Docker volumes are preserved, but containers may restart and the application may be temporarily unavailable during an update.
To update container images, `compose.yml`, `.env`, or `templates\startup.html` without losing database data: To change settings, edit `.env` or `compose.yml` in `C:\Apps\mini-pc-setup` before running the updater. The startup page is also copied to `C:\KioskApp` when present.
1. Log in to the Administrator account (press `Ctrl + Alt + Del` → **Sign out** or **Switch user**). ### Commission the device
2. Update `.env` or `compose.yml` inside `C:\Apps\mini-pc-setup` if needed.
3. Run **`C:\Apps\mini-pc-setup\scripts\update.bat`** as Administrator:
- Syncs `startup.html`, `compose.yml`, and `.env` (converting CRLF to LF).
- Runs `docker compose -p walmart pull` and `up -d --remove-orphans` (preserving database volumes).
- Verifies `/api/v1/system/health-check/` reports `Online` and prunes dangling Docker images.
### Uninstalling & Restoring Desktop (`scripts\uninstall.bat`) Use [CheckList.md](./CheckList.md) to verify WSL/Docker, application health, kiosk startup, persistent browser data, peripherals, and power recovery.
Run **`C:\Apps\mini-pc-setup\scripts\uninstall.bat`** as Administrator and select a mode: ### Uninstall or restore the desktop
- **`[1] Auto Wipe All`:** Automatically disables Auto-Logon, deletes the Kiosk user and browser profile (`C:\KioskBrowserData`), removes scheduled tasks and `C:\KioskApp`, tears down Docker containers and volumes (`down -v`), restores Balanced power plan, and deletes `C:\Apps\mini-pc-setup`. Run `C:\Apps\mini-pc-setup\scripts\uninstall.bat` as Administrator and choose a mode:
- **`[2] Manual / Custom`:** Prompts step-by-step whether to delete or restore the Kiosk user's normal Windows Desktop (`explorer.exe`), keep browser data, preserve database volumes, or keep the setup folder.
--- - **`1` Auto Wipe All:** Requires typing `YES`. Removes kiosk settings and user/profile, browser data, kiosk files/tasks, and the Walmart Compose project and volumes; restores the Balanced power plan and removes selected policies. If run from `C:\Apps\mini-pc-setup`, it also schedules that setup folder for deletion.
- **`2` Manual / Custom:** Prompts whether to delete or restore the kiosk user's desktop, keep browser data, remove the Compose project, delete its volumes, and remove the setup folder.
Deleting Compose volumes permanently deletes local application/database data. The uninstaller removes the application stack and its project files; it does **not** uninstall the WSL distribution or Docker packages.
## Troubleshooting ## Troubleshooting
- **Web app (`http://localhost:3000`) is unreachable after reboot:** - **The application is unavailable after reboot:** In Task Scheduler, inspect **WSL Docker Startup**. It should run at startup under the Administrator account used for installation (not `SYSTEM`). Check container status with:
- Open **Task Scheduler** as Administrator and check **`WSL Docker Startup`**. Ensure it is configured to run under the Administrator account that installed WSL2 (not `SYSTEM`) with _"Run whether user is logged on or not"_ enabled.
- Inspect backend container logs inside WSL:
```bat
wsl -d Ubuntu-22.04 -u root docker ps
```
- **Inspect backend logs:**
```bat
wsl -d Ubuntu-22.04 -u root docker logs tv-backend-prod wsl -d Ubuntu-22.04 -u root docker logs tv-backend-prod
```
- **Exiting Kiosk Mode for Admin Maintenance:** - **Registry login or image pull fails:** Confirm Internet access, registry credentials, and the `FRONTEND_IMAGE` and `BACKEND_IMAGE` values in `.env`.
- **With a physical keyboard:** Press **`Ctrl + Alt + Del`** → **Switch user** → sign in with your Administrator account.
- **Touchscreen only (no physical keyboard):** - **Leave kiosk mode for maintenance:** Press `Ctrl + Alt + Del` and switch/sign out to the Administrator account. The Administrator account retains the normal Windows desktop.
1. Turn the display off and back on (or press the physical power/sleep button briefly to lock the screen).
2. Swipe up on the Windows Lock Screen to reveal the sign-in screen.
3. Tap the **Administrator** account in the bottom-left corner, tap the password box (Windows On-Screen Touch Keyboard will appear automatically), and sign in.
+36 -5
View File
@@ -64,9 +64,27 @@ if exist "%ROOT_DIR%.env.example" set "ENV_SAMPLE=%ROOT_DIR%.env.example"
if "%ENV_SAMPLE%"=="" if exist "%ROOT_DIR%.env.template" set "ENV_SAMPLE=%ROOT_DIR%.env.template" if "%ENV_SAMPLE%"=="" if exist "%ROOT_DIR%.env.template" set "ENV_SAMPLE=%ROOT_DIR%.env.template"
if "%ENV_SAMPLE%"=="" goto :ENV_CLEANUP if "%ENV_SAMPLE%"=="" goto :ENV_CLEANUP
copy /Y "%ENV_SAMPLE%" "%ROOT_DIR%.env" >nul
echo [ACTION REQUIRED] Created .env from sample. Configure it in Notepad, save, and close... echo - Generating .env with secure random SECRET_KEY and Watchtower tokens...
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$tpl = Get-Content -Raw -Path '%ENV_SAMPLE%';" ^
"$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create();" ^
"$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.ToCharArray();" ^
"$b1 = New-Object byte[] 50; $rng.GetBytes($b1);" ^
"$secret = -join ($b1 | ForEach-Object { $chars[$_ %% $chars.Length] });" ^
"$b2 = New-Object byte[] 32; $rng.GetBytes($b2); $wtToken = ([BitConverter]::ToString($b2) -replace '-','').ToLower();" ^
"$b3 = New-Object byte[] 32; $rng.GetBytes($b3); $hookToken = ([BitConverter]::ToString($b3) -replace '-','').ToLower();" ^
"$tpl = $tpl -replace '<ENTER SECRET KEY HERE>', $secret;" ^
"$tpl = [regex]::Replace($tpl, '<ENTER TOKEN HERE>', $wtToken, 1);" ^
"$tpl = [regex]::Replace($tpl, '<ENTER TOKEN HERE>', $hookToken, 1);" ^
"$utf8NoBom = New-Object System.Text.UTF8Encoding $false;" ^
"[System.IO.File]::WriteAllText('%ROOT_DIR%.env', $tpl, $utf8NoBom);" ^
"if ($tpl -match '<ENTER ') { exit 2 } else { exit 0 }"
if %errorLevel% equ 2 (
echo [ACTION REQUIRED] Some placeholders remain in .env. Configure in Notepad, save, and close...
start /wait notepad.exe "%ROOT_DIR%.env" start /wait notepad.exe "%ROOT_DIR%.env"
)
:ENV_CLEANUP :ENV_CLEANUP
if not exist "%ROOT_DIR%.env" ( if not exist "%ROOT_DIR%.env" (
@@ -404,9 +422,9 @@ powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$set = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -ExecutionTimeLimit ([TimeSpan]::Zero) -RestartCount 5 -RestartInterval (New-TimeSpan -Minutes 1) -MultipleInstances IgnoreNew;" ^ "$set = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -ExecutionTimeLimit ([TimeSpan]::Zero) -RestartCount 5 -RestartInterval (New-TimeSpan -Minutes 1) -MultipleInstances IgnoreNew;" ^
"Register-ScheduledTask -TaskName 'WSL Docker Startup' -Action $act -Trigger $trig -Principal $prin -Settings $set -Force | Out-Null" "Register-ScheduledTask -TaskName 'WSL Docker Startup' -Action $act -Trigger $trig -Principal $prin -Settings $set -Force | Out-Null"
if %errorLevel% neq 0 ( if %errorLevel% neq 0 (
echo [WARNING] Failed to create Task Scheduler entry WSL Docker Startup! echo [WARNING] Failed to create Task Scheduler entry WSL Docker Startup.
) else ( ) else (
echo - Registered 24/7 startup task: WSL Docker Startup (User: %USERDOMAIN%\%USERNAME%) echo - Registered 24/7 startup task: WSL Docker Startup (User: %USERDOMAIN%\%USERNAME%^)
) )
set "WINLOGON_KEY=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" set "WINLOGON_KEY=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
@@ -422,6 +440,19 @@ set "EDGE_POL=HKLM\SOFTWARE\Policies\Microsoft\Edge"
reg add "%EDGE_POL%" /v "InPrivateModeAvailability" /t REG_DWORD /d 1 /f >nul reg add "%EDGE_POL%" /v "InPrivateModeAvailability" /t REG_DWORD /d 1 /f >nul
reg add "%EDGE_POL%" /v "ClearBrowsingDataOnExit" /t REG_DWORD /d 0 /f >nul reg add "%EDGE_POL%" /v "ClearBrowsingDataOnExit" /t REG_DWORD /d 0 /f >nul
reg add "%EDGE_POL%" /v "RestoreOnStartup" /t REG_DWORD /d 4 /f >nul reg add "%EDGE_POL%" /v "RestoreOnStartup" /t REG_DWORD /d 4 /f >nul
reg add "%EDGE_POL%" /v "ShowHomeButton" /t REG_DWORD /d 0 /f >nul
reg add "%EDGE_POL%" /v "HomepageLocation" /t REG_SZ /d "file:///C:/KioskApp/startup.html" /f >nul
reg add "%EDGE_POL%" /v "NewTabPageLocation" /t REG_SZ /d "file:///C:/KioskApp/startup.html" /f >nul
reg add "%EDGE_POL%" /v "DeveloperToolsAvailability" /t REG_DWORD /d 2 /f >nul
reg add "%EDGE_POL%" /v "AllowDeletingBrowserHistory" /t REG_DWORD /d 0 /f >nul
reg add "%EDGE_POL%" /v "PrintingEnabled" /t REG_DWORD /d 0 /f >nul
reg add "%EDGE_POL%" /v "DownloadRestrictions" /t REG_DWORD /d 3 /f >nul
reg add "%EDGE_POL%" /v "BookmarkBarEnabled" /t REG_DWORD /d 0 /f >nul
reg add "%EDGE_POL%" /v "AutofillAddressEnabled" /t REG_DWORD /d 0 /f >nul
reg add "%EDGE_POL%" /v "AutofillCreditCardEnabled" /t REG_DWORD /d 0 /f >nul
reg add "%EDGE_POL%" /v "PasswordManagerEnabled" /t REG_DWORD /d 0 /f >nul
reg add "%EDGE_POL%" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f >nul
reg add "%EDGE_POL%" /v "TranslateEnabled" /t REG_DWORD /d 0 /f >nul
powershell -NoProfile -ExecutionPolicy Bypass -Command ^ powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$user = '%KIOSK_USER%';" ^ "$user = '%KIOSK_USER%';" ^
@@ -436,7 +467,7 @@ powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$profilePath = (Get-ItemProperty $profReg -ErrorAction SilentlyContinue).ProfileImagePath;" ^ "$profilePath = (Get-ItemProperty $profReg -ErrorAction SilentlyContinue).ProfileImagePath;" ^
"if ($profilePath) {" ^ "if ($profilePath) {" ^
" $hivePath = Join-Path $profilePath 'NTUSER.DAT';" ^ " $hivePath = Join-Path $profilePath 'NTUSER.DAT';" ^
" $edgeCmd = '\"' + $edge + '\" --kiosk \"file:///C:/KioskApp/startup.html\" --edge-kiosk-type=fullscreen --user-data-dir=\"C:\KioskBrowserData\" --no-first-run --disable-features=TranslateUI --allow-file-access-from-files';" ^ " $edgeCmd = '\"' + $edge + '\" --kiosk \"file:///C:/KioskApp/startup.html\" --edge-kiosk-type=fullscreen --user-data-dir=\"C:\KioskBrowserData\" --no-first-run --allow-file-access-from-files --disable-pinch';" ^
" $loaded = $false;" ^ " $loaded = $false;" ^
" if (-not (Test-Path \"Registry::HKEY_USERS\$sid\")) {" ^ " if (-not (Test-Path \"Registry::HKEY_USERS\$sid\")) {" ^
" reg load \"HKU\$sid\" \"$hivePath\" >$null 2>&1;" ^ " reg load \"HKU\$sid\" \"$hivePath\" >$null 2>&1;" ^
+11 -2
View File
@@ -10,6 +10,15 @@
box-sizing: border-box; box-sizing: border-box;
} }
html,
body {
overscroll-behavior-x: none;
touch-action: pan-y;
-ms-content-zooming: none;
user-select: none;
-webkit-user-select: none;
}
body { body {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -45,7 +54,7 @@
#000 calc(100% - 12px) #000 calc(100% - 12px)
); );
border-radius: 50%; border-radius: 50%;
animation: spin 3s infinite ease-in-out; animation: spin 5s infinite ease-in-out;
} }
.loader::before, .loader::before,
.loader::after { .loader::after {
@@ -79,7 +88,7 @@
right/calc(200% + 1ch) 100%; right/calc(200% + 1ch) 100%;
-webkit-background-clip: text; -webkit-background-clip: text;
background-clip: text; background-clip: text;
animation: l7 3s infinite steps(100); animation: l7 5s infinite steps(100);
} }
.loader-text:before { .loader-text:before {
content: "Loading..."; content: "Loading...";