pixelbattle/README.md

39 lines
893 B
Markdown
Raw Normal View History

2023-07-30 11:43:19 +03:00
# pixelbattle
2023-07-31 19:36:49 +03:00
Self-hosted pixel battle written in NodeJS
2023-08-01 11:33:08 +03:00
# Deploying
2023-08-02 07:19:17 +03:00
## Traditional:
2023-08-01 11:33:08 +03:00
To deploy this pixelbattle, you need to:
1. Clone this repo:
`git clone https://git.foxarmy.org/leca/pixelbattle`
2. Install node deps:
2023-08-01 15:39:10 +03:00
`npm install`
2023-08-01 11:33:08 +03:00
3. Run:
`npm run prod`
2023-08-02 07:19:17 +03:00
4. To update:
`git pull`
`npm install`
2023-08-01 11:33:08 +03:00
2023-08-01 15:39:10 +03:00
## Docker:
1. Clone this repo:
`git clone https://git.foxarmy.org/leca/pixelbattle`
2. Build docker image:
`docker-compose up --build`
3. After building, you can just run it:
`docker-compose up -d`
4. To update:
2023-08-02 07:19:17 +03:00
`git pull`
2023-08-01 15:39:10 +03:00
`docker-compose up --build`
2023-08-01 11:33:08 +03:00
That's it!
# Tips & tricks
2024-04-06 05:53:37 +03:00
1. Server settings are located in `./pb-data/settings.json`, you need to change serverAddress after frist launch in order to deploy
2023-08-01 11:33:08 +03:00
2024-04-06 05:53:37 +03:00
2. When catches SIGUSR1, server will save a board with name read from settings file. SIGINT (CTRL + C) and SIGTERM does the same but exit server when board is saved
2023-08-01 11:33:08 +03:00