diff --git a/Dockerfile b/Dockerfile index fa055ab..a52d12b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,11 @@ RUN pip install --no-cache-dir pygbag==0.9.3 COPY main.py ./ COPY src/ ./src/ COPY assets/ ./assets/ +# Full-window canvas template; kept outside /app so it is not packed into the game. +COPY web/pygbag.tmpl /pygbag.tmpl # Do not publish the desktop leaderboard or developer files. RUN printf '[]\n' > src/highscore.json \ - && python -m pygbag --build --no_opt --disable-sound-format-error --title "Silent FH" . + && python -m pygbag --build --no_opt --disable-sound-format-error --title "Silent FH" --template /pygbag.tmpl . FROM nginxinc/nginx-unprivileged:1.28-alpine COPY --from=build /app/build/web/ /usr/share/nginx/html/ diff --git a/README.md b/README.md index 05bf477..5b09649 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ docker build -t silent-fh:web . docker run -d --name silent-fh --restart unless-stopped -p 8080:8080 silent-fh:web ``` -Open **http://localhost:8080**. Allow the initial runtime download to finish, +Open **http://localhost:8080** (it redirects to `127.0.0.1`, because the +Pygbag runtime treats `localhost` as its dev server). The game scales to fill +the browser window while keeping its aspect ratio. Allow the initial runtime download to finish, click the game/name field, enter a name, and press Enter. A desktop browser with a keyboard is recommended; touch controls are not implemented. Reload the page to start again after quitting the game. diff --git a/web/pygbag.tmpl b/web/pygbag.tmpl new file mode 100644 index 0000000..7e750b4 --- /dev/null +++ b/web/pygbag.tmpl @@ -0,0 +1,443 @@ + + + {{cookiecutter.title}} + + + + + + + + + + + + + + + + + + + + +
+ +
Downloading...
+
+ +
+
+ + + + + + + + +
Loading, please wait ...
+ +
+ +
+ + + + + +
+ + + + +
+
+
+ + + + +