Skip to content

Commit ac4a28b

Browse files
committed
Update documentation
Refactored documentation and add customization section
1 parent d2f9c34 commit ac4a28b

36 files changed

+99
-2
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
=============
2+
Customization
3+
=============
4+
5+
This section is not done yet!
6+
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
11+
provisioning
12+
supervisord
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
============
2+
Provisioning
3+
============
4+
5+
.. important:: Provision system is only available in Docker images which are based on ``webdevops/base``!
6+
7+
Provision Events
8+
----------------
9+
10+
==================================================== ==================================================================
11+
Provision event/tag Description
12+
---------------------------------------------------- ------------------------------------------------------------------
13+
``bootstrap`` Run on Docker image creation (only run once)
14+
``build`` Run on Docker image build
15+
``onbuild`` Run on Docker image ONBUILD
16+
``entrypoint`` Run on Docker image entrypoint execution
17+
(only here Environment variables are available)
18+
==================================================== ==================================================================
19+
20+
.. attention:: Try to avoid entrypoint provision tasks because it delays startup time.
21+
22+
Shell script provision
23+
----------------------
24+
25+
For each provision event there is a directory for shell scripts:
26+
27+
- ``/opt/docker/provision/bootstrap.d/``
28+
- ``/opt/docker/provision/build.d/``
29+
- ``/opt/docker/provision/onbuild.d/``
30+
- ``/opt/docker/provision/entrypoint.d/``
31+
32+
For customization just add your shell scripts into these directories for the simple shell script provision system.
33+
34+
35+
Ansible provision
36+
-----------------
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
=================
2+
Supervisor Daemon
3+
=================
4+
5+
.. important:: Supervisor is only available in Docker images which are based on ``webdevops/base``!
6+
7+
Introduction
8+
------------
9+
10+
Supervisor daemon is used to start and supervise more than one process in Docker containers. More about supervisor can
11+
be found on supervisor homepage at http://supervisord.org/
12+
13+
Configuration
14+
-------------
15+
16+
The main supervisor configuration file is located at ``/opt/docker/etc/supervisor.conf`` and only controls the
17+
supervisor daemon itself. All services are configured inside ``/opt/docker/etc/supervisor.d/`` directory.
18+
19+
Example configuration for hhvm::
20+
21+
[group:hhvm]
22+
programs=hhvmd
23+
priority=20
24+
25+
[program:hhvmd]
26+
command = /opt/docker/bin/service.d/hhvm.sh
27+
process_name=%(program_name)s
28+
directory = /var/run/hhvm/
29+
user = application
30+
startsecs = 0
31+
autostart = true
32+
autorestart = true
33+
stdout_logfile=/dev/stdout
34+
stdout_logfile_maxbytes=0
35+
stderr_logfile=/dev/stderr
36+
stderr_logfile_maxbytes=0
37+
38+
Service daemon scripts
39+
----------------------
40+
41+
For every service there is a small bash script inside ``/opt/docker/bin/service.d/`` which takes care how to start the
42+
service. This script also have a modular task runner which runs files from ``/opt/docker/bin/service.d/SERVICE.d/*.sh``.
43+
44+
Example for HHVM:
45+
46+
HHVM's service script is located at ``/opt/docker/bin/service.d/hhvm.sh``.
47+
48+
Before running HHVM all scripts found with ``/opt/docker/bin/service.d/hhvm.d/*.sh`` will be executed.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)