Skip to content
This repository has been archived by the owner on Sep 10, 2018. It is now read-only.

Include instructions for Docker Compose #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions en/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,50 @@ Where ``/path/to/music`` is the absolute path on your host where Sonerezh can fi

The ``--publish 8080:80`` option make Sonerezh available on the local port 8080 (http://127.0.0.1:8080).

^^^^^^^^^^^^^^
Docker Compose
^^^^^^^^^^^^^^

All the steps above can be combined with Docker Compose.

Create a new directory, and save the following as ``docker-compose.yml``.

Make sure to change the passwords.

.. code-block:: yaml

version: "2"

services:
sonerezh-db:
image: mariadb
volumes:
- "./mariadb:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: YOUR_ROOT_PASSWORD
MYSQL_USER: sonerezh
MYSQL_PASSWORD: YOUR_PASSWORD
MYSQL_DATABASE: sonerezh

sonerezh-app:
image: sonerezh/sonerezh:latest
volumes:
- "./music:/music"
- "./thumbnails:/thumbnails"
ports:
- "8080:80"
environment:
SONEREZH_DB_PORT_3306_TCP_ADDR: sonerezh-db
SONEREZH_DB_ENV_MYSQL_USER: sonerezh
SONEREZH_DB_ENV_MYSQL_PASSWORD: YOUR_PASSWORD
SONEREZH_DB_ENV_MYSQL_DATABASE: sonerezh
depends_on:
- sonerezh-db

Make sure the directories for the database, music and thumbnails exist, and run ``docker-compose up -d``.

Sonerezh should now be available on the local port 8080. (http://127.0.0.1:8080)

----------------------------------
Installation on a dedicated server
----------------------------------
Expand Down