From fee869a47878d5ef7e5227e5b2a58366a3652dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Olsen?= Date: Sun, 5 Mar 2017 13:12:10 +0100 Subject: [PATCH] Include instructions for Docker Compose --- en/installation.rst | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/en/installation.rst b/en/installation.rst index 89b6f30..73cdeba 100644 --- a/en/installation.rst +++ b/en/installation.rst @@ -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 ----------------------------------