Recyle game for kids
- docker v18.03.0
To build the docker image, run the following command in the terminal:
docker build -t harryliu/waste-drop:alpha .
Create data/leader-board.data.json
file inside project root directory:
mkdir data
nano data/leader-board.data.json
and replace its content with:
[]
Create .env
file inside project root directory:
nano .env
and replace its content with:
SECRET=waste-drop
To lunch the docker container, run the following in the terminal:
docker run -v ${PWD}:/usr/src/app -p 8081:3000 --env-file=.env -dt harryliu/waste-drop:alpha
Now you can play the game by visiting http://localhost:8081
in the broswer.
To configure custom domain name for the game, you first need to create a nginx configuration file for the virtual host:
sudo nano /etc/nginx/sites-available/000-example.com
and replace content of the configuration with:
server {
listen 80 http2;
listen [::]:80 http2;
server_name example.com;
location / {
proxy_no_cache 1;
proxy_cache_bypass 1;
proxy_pass http://127.0.0.1:8081;
}
}
You also need to create a symbolic link for the configuration:
sudo ln -s /etc/nginx/sites-available/000-example.com /etc/nginx/sites-enabled/000-example.com
and reload it:
sudo systemctl reload nginx
Now you can play the game by visiting http://example.com
in the broswer.
- Yang Liu - Initial work - byliuyang
Special thanks to soundimage.org and freesound.org for providing the sounds effects.