This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
Kristián Partl edited this page Dec 10, 2022
·
4 revisions
Surftimer-Web-Stats works on latest Release of Surftimer-Official. (May be problems on Pre-Release versions).
- Maps must have selected tier and be added to server with sm_addnewmap(!addnewmap) command on server
- Web Server
- PHP-8.0+ (PHP extensions: mysqli, bcmath)
- A MySQL Database with Surftimer-Official data (MySQL 5.7, MySQL 8+, MariaDB supported)
- DB user with permissions to SELECT, ALTER TABLE, UPDATE AND INSERT.
- Download the latest version from the release page here
- Copy unziped files into your website directory
- Edit
/inc/config.php
- Docker
- Optionally Docker Compose
Start by cloning the Git repo to a new folder on your computer.
git clone --depth 1 https://github.com/surftimer/SurfTimer-Web-Stats
If you are using Docker by itself you could use the following command.
docker build -t surftimer-web-stats:latest ./SurfTimer-Web-Stats
docker run -d \
-e DB_HOST=database_host \
-e DB_PORT=database_port \
-e DB_USER=database_user \
-e DB_PASS=database_pass \
-e DB_NAME=database_name \
-e "NAVBAR_TITLE=My Surf Server" \
-p 8080:80 \
surftimer-web-stats:latest
If you are instead using Docker Compose you could have the following in your
docker-compose.yml
file:
version: "3.9"
services:
web-stats:
build: ./SurfTimer-Web-Stats
ports:
- 8080:80
environment:
- DB_HOST=database_host
- DB_PORT=database_port
- DB_USER=database_user
- DB_PASS_FILE=/run/secrets/database_pass
- DB_NAME=database_name
- "NAVBAR_TITLE=My Surf Server"
secrets:
- database_pass
secrets:
database_pass:
file: ./secrets/database_pass.txt
This example above also shows how you could make use of Docker Secrets safely store your passwords.
Name | Description | Default |
---|---|---|
DB_HOST |
Host address of the database | your_database_host |
DB_PORT |
Port for connecting to the database | 3306 |
DB_USER |
Username to log in to the database with | your_database_username |
DB_PASS |
Password to log in to the database with | your_database_password |
DB_PASS_FILE |
Docker Secrets file for the database's password | None |
DB_NAME |
Name of the database to use | your_database_name |
SETTINGS_THEME |
Colour theme to use | default |
SETTINGS_FAVICON |
Favicon to use for the site icon | logo.svg |
NAVBAR_LOGO |
Logo to use for the navbar | logo.svg |
NAVBAR_TITLE |
Title of the navbar | Surf Stats |
PLAYER_PROFILE_ICON |
Player profile icon | FALSE |
MAP_LINK_ICON |
Map link icon | FALSE |
CUSTOM_LINK_NAME |
Name of the first link in the navbar | <i class="fas fa-globe-europe"></i> Website |
CUSTOM_LINK_ADDRESS |
Address of the first link in the navbar | https://github.com/surftimer/SurfTimer-Web-Stats |
CUSTOM_LINK_NAME_2 |
Name of the second link in the navbar | <i class="fab fa-discord"></i> Discord |
CUSTOM_LINK_ADDRESS_2 |
Address of the second link in the navbar | https://discord.surftimer.dev |
CUSTOM_LINK_NAME_3 |
Name of the third link in the navbar | None |
CUSTOM_LINK_ADDRESS_3 |
Address of the third link in the navbar | None |
PLAYER_FLAGS |
Players Flags | TRUE |