This project is a web interface to display current SPTarkov Fika raids. It uses PHP and composer to handle its dependencies. The site provides a visual representation of various raids and their data, sourced from the server.
Before deploying the project, ensure you have the following:
- Docker and Docker Compose installed.
- Alternatively, you can use PHP (version 8.1 or higher) and a web server like Apache or Nginx, though Docker simplifies the process.
The easiest way to get this project running is by using Docker Compose. Follow these steps:
The docker-compose.yml file can be found here
docker pull rambomst/sptarkov-fika-raid-info-viewerdocker compose up -d --remove-orphansThis will automatically set up the necessary environment and dependencies. Your application will be available at http://localhost by default.
git clone https://github.com/Rambomst/sptarkov-fika-raid-info-viewer.git
cd sptarkov-fika-raid-info-viewerThe project uses composer for managing PHP dependencies. Ensure you have Composer installed.
composer installOnce the configuration is complete, the application is ready to run on your web server.
You can use any PHP server or set up an Apache/Nginx environment to serve the files.
This project uses FastRoute to handle URL routing, which means all requests should be directed to index.php. Below are the instructions for configuring both Apache and Nginx to achieve this.
For Apache, you will need to enable mod_rewrite and update the .htaccess file to ensure all requests are routed through index.php.
-
Ensure
mod_rewriteis enabled in Apache:a2enmod rewrite
-
Add or update the
.htaccessfile in the root of your project directory with the following content:<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Redirect all requests to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [L] </IfModule>
-
Ensure the Apache configuration for your site allows
.htaccessfiles:<Directory /path/to/your/project> AllowOverride All </Directory>
For Nginx, you can configure the server to route all requests to index.php by modifying the server block configuration.
-
Open the Nginx configuration file for your site.
-
Update the
locationblock to pass all requests that aren't for existing files or directories toindex.php:server { listen 80; server_name your-domain.com; root /path/to/your/project; index index.php; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
-
Reload Nginx to apply the changes:
sudo systemctl reload nginx
After making these changes, all requests to your site will be routed through index.php, allowing FastRoute to handle the routing logic.
To update the composer dependencies, run:
composer updateThis will fetch and install the latest versions of the dependencies defined in the composer.json file.
Feel free to fork this repository and submit pull requests. Any help to improve this project is welcome.
