Skip to content

Commit

Permalink
vagrant+docker: improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
landam committed Jun 25, 2017
1 parent fae64a8 commit ae9174c
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 7 deletions.
Binary file added docs/img/installation/vagrant-login.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 26 additions & 3 deletions docs/installation/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ source code (`docker/example.docker-compose.yml
example is shown below.

.. code-block:: yaml
:emphasize-lines: 7
:emphasize-lines: 7, 17, 18, 31, 9, 33
:linenos:
version: "2"
Expand Down Expand Up @@ -54,8 +54,31 @@ example is shown below.
- "433:443"
It is important to set up shared directories mounted by Docker images
as volumes. *QGIS Server* requires setting up :file:`publish` directory
used for published Gisquick projects (see line ``7``).
as volumes. *QGIS Server* requires setting up :file:`publish`
directory which is used for published Gisquick projects (see line
``7``). *Django Application* stores SQLite database in :file:`data`
directory (line ``17``), tile cache is managed in :file:`media`
directory (line ``18``). SSL certificates used by *Nginx Web Server*
are stored in directory :file:`letsencrypt` (line ``31``).

.. tip:: |tip| Use :file:`certbot` directory instead of
:file:`letsencrypt` when it is intended to use Webroot mode
to generate new or renew existing Certbot's SSL certificates.

QGIS server is running in this case on port 90 (see line ``9``), Nginx
web server on default port for HTTPS protocol 433 (line ``33``).

Before running composed Docker images, shared directories must be
created on host machine. In this case all directories is located in
the same folder as :file:`docker-compose.yml` file.

.. code-block:: bash
$ mkdir -p _data/publish
$ mkdir -p _data/media
$ mkdir -p _data/data
$ mkdir -p _data/etc/letsencrypt
Useful tips
-----------
Expand Down
39 changes: 35 additions & 4 deletions docs/installation/vagrant.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ To deploy virtual server called ``gisquick`` run:
==> gisquick: Running provisioner: install (ansible)...
gisquick: Running ansible-playbook...
...
PLAY RECAP *********************************************************************
gisquick : ok=4 changed=0 unreachable=0 failed=0
.. tip:: |tip| To speed up provisioning using *Apt proxy server*, set
``APT_PROXY`` variable before running above command like ``$ export
APT_PROXY=http://192.168.99.118:3142``. Check `instructions
Expand Down Expand Up @@ -71,7 +73,7 @@ called from server prompt.
.. code-block:: sh
:emphasize-lines: 1
$ /vagrant/utils/tmux-dev.sh
vagrant@gisquick:~$ /vagrant/utils/tmux-dev.sh
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
System check identified no issues (0 silenced).
Expand All @@ -94,6 +96,35 @@ called from server prompt.
[developme 0:servers* "gisquick" 20:17 01-May-16
Gisquick can be accessed on https://0.0.0.0:8000 from web browser
started at host machine.
Afterwards Gisquick can be accessed on https://0.0.0.0:8000.
.. figure:: ../img/installation/vagrant-login.png
Development services can be stopped from server terminal by ``tmux``
command.
.. code-block:: sh
vagrant@gisquick:~$ tmux kill-session
After logout, running virtual server can be shutdown by
.. code-block:: sh
$ vagrant halt
Halted machine can be launched again by ``vagrant up`` command.
.. note:: To destroy virtual machine and delete all related files type
.. code-block:: sh
$ vagrant destroy -f
Running virtual machine can be updated by
.. code-block:: sh
$ vagrant provision

0 comments on commit ae9174c

Please sign in to comment.