Installation
TIP
We highly recommend that you use docker-compose
to quickly get started with this application
Docker compose
Prerequisites
Before run the following command you need to have a server with :
Install
Create a folder and add this docker-compose.yml
file :
version: '3.3'
services:
highscore:
image: emilienleroy/highscore:latest
ports:
- '8081:8081'
depends_on:
- "mongo"
stdin_open: true
tty: true
volumes:
- ./custom:/opt/custom
- ./logs:/opt/logs
- ./config/ban.json:/opt/config/ban.json
environment:
- HIGHSCORE_PORT=8081
- HIGHSCORE_DB_URL=mongodb://mongo:27017/highscore
- HIGHSCORE_SESSION_SECRET=yoursupersecret
- HIGHSCORE_TITLE=
- HIGHSCORE_DESCRIPTION=
- HIGHSCORE_LOGO_URL=
- HIGHSCORE_FAVICON_URL=
- HIGHSCORE_CSS_URL=
- HIGHSCORE_DOWNLOAD_URL=
- HIGHSCORE_WINDOWS_DOWNLOAD_URL=
- HIGHSCORE_LINUX_DOWNLOAD_URL=
- HIGHSCORE_MACOS_DOWNLOAD_URL=
- HIGHSCORE_ANDROID_DOWNLOAD_URL=
- HIGHSCORE_IOS_DOWNLOAD_URL=
- HIGHSCORE_USERNAME_DOCS=
- HIGHSCORE_PASSWORD_DOCS=
- HIGHSCORE_USERNAME_METRICS=
- HIGHSCORE_PASSWORD_METRICS=
- HIGHSCORE_RATE_LIMIT_MINUTE=
- HIGHSCORE_RATE_LIMIT_NUMBER=
- HIGHSCORE_PRIVACY_EMAIL=
- HIGHSCORE_PRIVACY_WEBSITE=
- HIGHSCORE_PRIVACY_COUNTRY=
- HIGHSCORE_DISABLE_DOCS=
- HIGHSCORE_DISABLE_METRICS=
- HIGHSCORE_DISABLE_BAD_WORDS=
- HIGHSCORE_DISABLE_RATE_LIMIT=
mongo:
image: mongo:5.0.8
volumes:
- data:/data/db
volumes:
data:
TIP
Go to the configuration section to get more informations about each environnement variables.
And now run this command :
$ docker-compose up -d
Manual
WARNING
Use source in production is possible but not recommanded.
Prerequisites
Before install the project you need to have a server with :
Install
First clone the repository and install dependencies using npm.
$ git clone https://github.com/EmilienLeroy/HighScore.git
$ cd highscore
$ npm install
Next add an .env
file with your configuration. See the .env.example
file to get more informations about the environment variables. After you need to build the sourcre using the following command :
$ npm run build
When the build it's finish you need to install pm2
to run the app as a process.
$ npm install -g pm2
Now just run the following command an the app should start :
$ npm run start:prod