Compare commits

..

1 Commits
master ... prod

Author SHA1 Message Date
Simponic
f6871ced27 Add prod branch for launching on simponic.xyz 2022-06-04 16:01:10 -06:00
7 changed files with 22 additions and 7 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
node_modules

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM node:18.2.0
ENV NODE_ENV=production
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install
COPY . .
CMD [ "node", "index.js" ]

View File

@ -15,6 +15,3 @@ It's as simple as:
npm install
npm run start
```
## Play online
[on my website](https://simponic.xyz/bbiy/)

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
version: '3'
services:
prod:
build: ./
ports:
- "3000:3000"
expose:
- 3000

2
src/bootstrap.js vendored
View File

@ -106,7 +106,7 @@ game.bootstrap = (() => {
const loadLevels = function() {
game.levels = [];
fetch('/levels')
fetch('levels')
.then((r) => r.json())
.then((r) => game.levels = r);
}

View File

@ -31,7 +31,7 @@ game.startLoop = () => {
game.lastTimeStamp = performance.now();
game.assets.music.play();
if (game.assets.music.paused) {
alert("Failed to start background music; please allow autoplay in your browser settings.");
alert("Failed to start background music; please allow autoplay in your browser settings and refresh.");
}
requestAnimationFrame(game.loop);
};

View File

@ -1,7 +1,7 @@
body {
margin: 0;
font-family: Lucida Sans Typewriter,Lucida Console,monaco,Bitstream Vera Sans Mono,monospace;
background-image: url("/assets/image/background.gif");
background-image: url("/bbiy/assets/image/background.gif");
background-size: cover;
image-rendering: pixelated;
}