# RVR [![Build Status](https://ci.esoko.eu/job/rvr-nextgen/job/master/badge/icon)](https://ci.esoko.eu/job/rvr-nextgen/job/master/) This is the RVR Application project. ## Installation ### Set environment variables The `.env` file contains several environment variables that are needed by the application to work properly. These should be configured for your environment. Check `.env.example` for reference. **Important: `DEV` should NOT be set for production! See section Development if you want to use the application in development mode.** ### Docker Compose Create a `docker-compose.yml` file. The example code below assumes that `.env` is placed in the same folder. ```yml version: '3' services: app: image: git.esoko.eu/esoko/rvr:latest depends_on: mariadb: condition: service_healthy ports: - 80:80 volumes: - .env:/var/www/rvr/.env mariadb: image: mariadb:10.3 volumes: - mysql:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: 'root' MYSQL_DATABASE: 'rvr' MYSQL_USER: 'rvr' MYSQL_PASSWORD: 'rvr' healthcheck: test: ["CMD-SHELL", "mysqladmin -u $$MYSQL_USER -p$$MYSQL_PASSWORD ping -h localhost || exit 1"] start_period: 5s start_interval: 1s interval: 5s timeout: 5s retries: 5 volumes: mysql: ``` Execute the following command: ```bash docker compose up -d ``` **And you are done!** The application is ready to use. You can create the first administrative user with the following command after attaching to the `app` container: ``` ./rvr user:add EMAIL PASSWORD admin ``` ## Development ### Set environment variables `.env.example` should be copied to `.env` into the repo root. Only the variables for external dependencies (API keys, map attribution, etc.) should be adapted. All other variables (for DB connection, static root, mailing, multiplayer, etc.) are fine with the default value. **`DEV=1` should be set for development!** ### Docker Compose Execute the following command from the repo root: ```bash docker compose up -d ``` **And you are done!** You can reach the application on http://localhost. The mails that are sent by the application can be found on http://localhost:8080. If needed, the database server can be directly reached on localhost:3306, or you can use Adminer web interface on http://localhost:9090 You might have to attach to the `app` container, e.g. for creating users, `composer update`, etc. --- *License: **GNU AGPL 3.0**. Full license text can be found in file `LICENSE`.*