rvr-nextgen/README.md

84 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2023-04-08 00:42:55 +02:00
# RVR
[![Build Status](https://ci.esoko.eu/job/rvr-nextgen/job/master/badge/icon)](https://ci.esoko.eu/job/rvr-nextgen/job/master/)
2023-09-28 13:31:26 +02:00
This is the RVR Application project.
2023-04-08 00:42:55 +02:00
## Installation
2023-09-28 13:31:26 +02:00
### Set environment variables
2023-04-08 00:42:55 +02:00
2023-09-28 13:31:26 +02:00
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:
2023-04-08 00:42:55 +02:00
```
2023-09-28 13:31:26 +02:00
Execute the following command:
```bash
2023-04-08 00:42:55 +02:00
docker compose up -d
```
2023-09-28 13:31:26 +02:00
**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:
2023-04-08 00:42:55 +02:00
```
2023-09-28 13:31:26 +02:00
./rvr user:add EMAIL PASSWORD admin
2023-04-08 00:42:55 +02:00
```
2023-09-28 13:31:26 +02:00
## Development
2023-04-08 00:42:55 +02:00
2023-09-28 13:31:26 +02:00
### Set environment variables
2023-04-08 00:42:55 +02:00
2023-09-28 13:31:26 +02:00
`.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!**
2023-04-08 00:42:55 +02:00
2023-09-28 13:31:26 +02:00
### Docker Compose
2023-04-08 00:42:55 +02:00
2023-09-28 13:31:26 +02:00
Execute the following command from the repo root:
```bash
docker compose up -d
2023-04-08 00:42:55 +02:00
```
2023-09-28 13:31:26 +02:00
**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
2023-04-08 00:42:55 +02:00
2023-09-28 13:31:26 +02:00
You might have to attach to the `app` container, e.g. for creating users, `composer update`, etc.
2023-04-08 00:42:55 +02:00
---
*License: **GNU AGPL 3.0**. Full license text can be found in file `LICENSE`.*