2022-02-17 14:38:33 +00:00
|
|
|
# Installation
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
To install the docker-compose app,
|
|
|
|
you will need to have the following dependencies installed:
|
|
|
|
|
|
|
|
- [Git](https://git-scm.com/)
|
|
|
|
- [GNU Make](https://www.gnu.org/software/make/)
|
|
|
|
- [MdBook](https://github.com/rust-lang/mdBook)
|
|
|
|
- [Docker](https://www.docker.com/products/overview)
|
|
|
|
- [Docker Compose](https://docs.docker.com/compose/install/)
|
|
|
|
|
|
|
|
## Clone the repository
|
|
|
|
|
|
|
|
For building the containers from scratch, the repository's packages are required.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://git.dergrimm.net/mentorenwahl/mentorenwahl.git
|
|
|
|
cd mentorenwahl/
|
|
|
|
```
|
|
|
|
|
|
|
|
After that you will need to create an environment configuration file.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
cp .example.env .env
|
|
|
|
```
|
|
|
|
|
|
|
|
## Build the containers
|
|
|
|
|
|
|
|
Building the project is as simple as invoking the `make` command
|
|
|
|
according to following options:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# Production build
|
|
|
|
make prod
|
|
|
|
|
|
|
|
# Development build
|
|
|
|
make dev
|
|
|
|
```
|
2022-02-17 17:27:19 +00:00
|
|
|
|
|
|
|
## Run the containers
|
|
|
|
|
|
|
|
Running the containers is done with `docker-compose`:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# TTY attached
|
|
|
|
docker-compose up
|
|
|
|
|
|
|
|
# TTY detached
|
|
|
|
docker-compose up -d
|
|
|
|
```
|