feat: add container setup

- build container with multi-stage Dockerfile
- change api listen port to 9001
This commit is contained in:
Kyle Robbertze 2022-06-09 17:21:29 +02:00 committed by Jonas L
parent 5d31e04b28
commit 1da42b2603
16 changed files with 1166 additions and 18 deletions

View file

@ -19,19 +19,15 @@ If you are coming from **Airtime**, please follow the [Airtime migration guide](
You can install LibreTime using the one of the following methods:
- [:rocket: Using the installer](#using-the-installer)
- :construction: Using Ansible
- [:rocket: Using docker-compose](#using-docker-compose)
- :construction: Using ansible
#### Minimum system requirements
### Minimum system requirements
- 1 Ghz Processor
- 2 GB RAM recommended (1 GB required)
- A static external IP address ([How to setup a static ip using Netplan](../tutorials/setup-a-static-ip-using-netplan.md))
One of the [supported distribution releases](../../developer-manual/development/releases.md#distributions-releases-support):
- [Debian 11](https://www.debian.org/releases/)
- [Ubuntu 20.04 LTS](https://wiki.ubuntu.com/Releases)
:::warning
Make sure that you have configured a **firewall** and it's not blocking connection to the desired ports.
@ -50,6 +46,11 @@ LibreTime requires the following default ports to be open:
The installer is shipped in the released tarballs or directly in the project repository.
We recommend installing on one of the following [distribution releases](../../developer-manual/development/releases.md#distributions-releases-support):
- [Debian 11](https://www.debian.org/releases/)
- [Ubuntu 20.04 LTS](https://wiki.ubuntu.com/Releases)
### Before installing
Before installing LibreTime, you need to make sure you operating system is properly configured.
@ -207,13 +208,83 @@ sudo systemctl start libretime.target
sudo systemctl --all --plain | grep libretime
```
#### Configure
Next, continue by [configuring your installation](#configure).
## Using docker-compose
:::warning
The docker-compose install is still a work in progress and is **EXPERIMENTAL**, breaking changes may occur without notice.
:::
### Download
Pick the version you want to install:
<CodeBlock language="bash">
echo LIBRETIME_VERSION="{vars.version}" > .env
</CodeBlock>
Download the docker-compose files from the repository:
```bash
# Load LIBRETIME_VERSION variable
source .env
wget "https://raw.githubusercontent.com/libretime/libretime/$LIBRETIME_VERSION/docker-compose.yml"
wget "https://raw.githubusercontent.com/libretime/libretime/$LIBRETIME_VERSION/docker/nginx.conf"
wget "https://raw.githubusercontent.com/libretime/libretime/$LIBRETIME_VERSION/docker/config.yml"
```
### Setup
Once the files are downloaded, edit the [configuration file](./configuration.md) at `./config.yml` to fill required information and to match your needs.
:::info
The `docker/config.yml` configuration file you previously downloaded already contains specific values required by the container setup, you should not change them:
```yaml
database:
host: "postgres"
rabbitmq:
host: "rabbitmq"
playout:
liquidsoap_host: "liquidsoap"
liquidsoap:
server_listen_address: "0.0.0.0"
stream:
outputs:
.default_icecast_output:
host: "icecast"
```
:::
Next, run the following commands to setup the database:
```bash
docker-compose run --rm api libretime-api migrate
```
Finally, start the services, and check that they are running properly using the following commands:
```bash
docker-compose up -d
docker-compose logs -f
```
Next, continue by [configuring your installation](#configure).
## Configure
Once the setup is completed, log in the interface and make sure to edit the project settings (go to **Settings** > **General**) to match your needs. Important settings are:
- Timezone
- First day of the week
### Next
## Next
Once completed, it's recommended to [install a reverse proxy](./reverse-proxy.md) to setup SSL termination and secure your installation.