devilbox/docs/getting-started/install-the-devilbox.rst

112 lines
2.6 KiB
ReStructuredText
Raw Normal View History

2018-07-08 16:22:43 +00:00
.. include:: /_includes/all.rst
2018-07-03 13:47:58 +00:00
.. _install_the_devilbox:
2018-03-11 10:26:03 +00:00
********************
Install the Devilbox
********************
2018-03-11 13:57:10 +00:00
.. important::
2018-07-03 13:47:58 +00:00
Ensure you have read and followed the :ref:`prerequisites`
2018-03-11 13:57:10 +00:00
2018-03-16 08:25:51 +00:00
**Table of Contents**
.. contents:: :local:
2018-07-03 13:47:58 +00:00
Download the Devilbox
2018-03-11 10:26:03 +00:00
=====================
2018-07-03 13:47:58 +00:00
The Devilbox does not need to be installed. The only thing that is required is its git directory.
2018-03-11 10:26:03 +00:00
To download that, open a terminal and copy/paste the following command.
2018-03-11 11:33:54 +00:00
.. code-block:: bash
2018-03-11 10:26:03 +00:00
2018-03-11 13:57:10 +00:00
host> git clone https://github.com/cytopia/devilbox
2018-03-11 10:26:03 +00:00
2018-07-03 13:47:58 +00:00
.. seealso::
2018-03-11 10:26:03 +00:00
2018-07-03 13:47:58 +00:00
* :ref:`howto_open_terminal_on_mac`
* :ref:`howto_open_terminal_on_win`
* :ref:`checkout-different-devilbox-release`
2018-03-11 10:26:03 +00:00
Create ``.env`` file
====================
2018-07-03 13:47:58 +00:00
Inside the cloned Devilbox git directory, you will find a file called ``env-example``. This file
is the main configuration with sane defaults for Docker Compose. In order to use it, it must be
copied to a file named ``.env``. (Pay attention to the leading dot).
2018-03-11 10:26:03 +00:00
2018-03-11 11:33:54 +00:00
.. code-block:: bash
2018-03-11 10:26:03 +00:00
2018-03-11 13:57:10 +00:00
host> cp env-example .env
2018-03-11 10:26:03 +00:00
2018-07-03 13:47:58 +00:00
The ``.env`` file does nothing else then providing environment variables for Docker Compose
and in this case it is used as the main configuration file for the Devilbox by providing all kinds
2018-03-11 10:26:03 +00:00
of settings (such as which version to start up).
2018-03-15 08:09:42 +00:00
.. seealso::
2018-07-03 13:47:58 +00:00
* |ext_lnk_docker_cmpose_env_file|
* :ref:`env_file`
2018-03-11 10:26:03 +00:00
2018-07-03 13:47:58 +00:00
Set uid and gid
===============
2018-03-11 10:26:03 +00:00
To get you started, there are only two variables that need to be adjusted:
* ``NEW_UID``
* ``NEW_GID``
The values for those two variables refer to your local (on your host operating system) user id
and group id. To find out what the values are required in your case, issue the following commands
on a terminal:
Find your user id
-----------------
2018-03-11 11:33:54 +00:00
.. code-block:: bash
2018-03-11 10:26:03 +00:00
2018-03-11 13:57:10 +00:00
host> id -u
2018-03-11 10:26:03 +00:00
Find your group id
------------------
2018-03-11 11:33:54 +00:00
.. code-block:: bash
2018-03-11 10:26:03 +00:00
2018-03-11 13:57:10 +00:00
host> id -g
2018-03-11 10:26:03 +00:00
In most cases both values will be ``1000``, but for the sake of this example, let's assume a value
of ``1001`` for the user id and ``1002`` for the group id.
Open the ``.env`` file with your favorite text editor and adjust those values:
.. code-block:: bash
:caption: .env
:emphasize-lines: 3,4
2018-03-11 13:57:10 +00:00
host> vi .env
2018-03-11 10:26:03 +00:00
NEW_UID=1001
NEW_GID=1002
.. seealso::
2018-07-03 13:47:58 +00:00
* |ext_lnk_uid|
* :ref:`howto_find_uid_and_gid_on_mac`
* :ref:`howto_find_uid_and_gid_on_win`
* :ref:`syncronize_container_permissions`
2018-03-11 10:26:03 +00:00
Checklist
=========
2018-07-03 13:47:58 +00:00
1. Devilbox is cloned
2. ``.env`` file is created
3. User and group id have been set in ``.env`` file
2018-03-11 10:26:03 +00:00
That's it, you have finished the first section and have a working Devilbox ready to be started.
2018-07-06 07:30:52 +00:00
.. seealso:: :ref:`troubleshooting`