@@ -9,49 +9,52 @@ graphical docker front ends like
9
9
10
10
.. hint ::
11
11
12
- We do not provide support in terms of Docker (-Compose) or Portainer specific problems.
13
- If you choose to run Zammad via Docker, support is only provided for the Zammad application.
12
+ We do not provide support in terms of Docker (-Compose) or Portainer specific
13
+ problems. If you choose to run Zammad via Docker, support is only provided
14
+ for the Zammad application.
14
15
15
16
Prerequisites
16
17
-------------
17
18
18
19
* This documentation expects you already have a working
19
20
`Docker Compose <https://docs.docker.com/compose/ >`_ environment.
20
21
* Make sure to have at least 4 GB of RAM to run the containers.
21
- * You're required to adjust your host's settings to run Elasticsearch properly:
22
+ * You should adjust your host's settings to run Elasticsearch properly:
22
23
23
24
.. code-block :: sh
24
25
25
- $ sysctl -w vm.max_map_count=262144
26
+ sysctl -w vm.max_map_count=262144
26
27
27
28
Deployment with Portainer
28
29
-------------------------
29
30
30
- The easiest way to get Zammad running is via a graphical docker UI. We recommend `Portainer <https://www.portainer.io/ >`_.
31
- For installation instructions, check out `Portainer's documentation <https://docs.portainer.io/ >`_.
31
+ The easiest way to get Zammad running is via a graphical docker UI. We recommend
32
+ `Portainer <https://www.portainer.io/ >`_.
33
+ For installation instructions, check out
34
+ `Portainer's documentation <https://docs.portainer.io/ >`_.
32
35
33
- Step 1: ** Add Stack **
36
+ Step 1: Add Stack
34
37
In the Portainer GUI (e.g. ``https://yourdomain.tld:9443 ``),
35
38
choose your target environment, select **Stacks ** and
36
39
choose **Add stack ** as you can see in the screenshot below.
37
40
38
- Step 2: ** Build From Repository **
41
+ Step 2: Build From Repository
39
42
Switch to **Repository ** build method and provide the information below:
40
43
41
44
- **Name **: enter a desired name of the stack
42
45
- **Repository URL **: ``https://github.com/zammad/zammad-docker-compose ``
43
46
- **Repository reference **: ``refs/heads/master ``
44
47
- **Compose path **: ``docker-compose.yml `` (default)
45
48
46
- Optional: if you need to provide
47
- :doc: `environment variables <./docker-compose/environment >`, you can enter
48
- them in the **Environment variable ** section or even upload a ``.env `` file.
49
- See the `example env template <https://github.com/zammad/zammad-docker-compose/blob/master/.env.dist >`_.
49
+ If you want to customize the stack, read on in
50
+ :ref: `the customization section <customizing-stack >` below.
50
51
51
- Zammad runs on port ``8080 `` by default. If you want to use another port, you can set it via the variable ``NGINX_EXPOSE_PORT ``.
52
+ Zammad runs on port ``8080 `` by default. If you want to use another port, you
53
+ can set it via the variable ``NGINX_EXPOSE_PORT ``.
52
54
53
- Step 3: **Deploy the Stack **
54
- After the stack is ready, you can access Zammad via the configured docker host and port, e.g. ``http://localhost:8080/ ``.
55
+ Step 3: Deploy the Stack
56
+ After the stack is ready, you can access Zammad via the configured docker
57
+ host and port, e.g. ``http://localhost:8080/ ``.
55
58
56
59
.. figure :: /images/install/docker-compose/portainer/portainer-stacks.png
57
60
:alt: Screenshot showing portainer UI with stacks section and highlighted "Add stack" button
@@ -63,52 +66,75 @@ Step 3: **Deploy the Stack**
63
66
64
67
Stack creation with provided information in **Repository ** screen
65
68
66
-
67
69
Deployment with Docker-Compose
68
70
------------------------------
69
71
70
- Step 1: ** Clone the GitHub Repo **
72
+ Step 1: Clone the GitHub Repo
71
73
.. code-block :: sh
72
74
73
- $ git clone https://github.com/zammad/zammad-docker-compose.git
75
+ git clone https://github.com/zammad/zammad-docker-compose.git
74
76
75
77
Make sure to run ``git pull `` frequently to fetch updates.
76
78
Alternatively, you can download the files from
77
79
`the releases page <https://github.com/zammad/zammad-docker-compose/releases >`_.
78
80
79
- Step 2: **Adjust Environment as Needed **
80
- In some cases our default environment is not what a docker-compose user is
81
- looking for. See :doc: `/install/docker-compose/environment ` for details on
82
- which settings can be configured.
83
-
84
- .. note :: If you want to use a ``.env`` file, you can use the provided
85
- ``.env.dist `` file and copy it to ``.env ``. That way it will be picked
86
- up by Docker-Compose automatically and not overwritten during updates.
81
+ Step 2: Adjust Environment as Needed
82
+ In some cases, our default environment is not what a docker-compose user is
83
+ looking for. You can customize the stack using pre-defined scenarios and
84
+ adjust environment variables. Jump to the
85
+ :ref: `customization section <customizing-stack >` below to find more
86
+ information.
87
87
88
- Zammad runs on port ``8080 `` by default. If you want to use another port, you can set it via the variable ``NGINX_EXPOSE_PORT ``.
88
+ Zammad runs on port ``8080 `` by default. If you want to use another port, you
89
+ can set it via the variable ``NGINX_EXPOSE_PORT ``.
89
90
90
91
Step 3: Start the stack
91
92
.. code-block :: sh
92
93
93
- $ cd zammad-docker-compose
94
- $ docker compose up -d
94
+ cd zammad-docker-compose
95
+ docker compose up -d
95
96
96
- After the stack is ready, you can access Zammad via the configured docker host and port, e.g. ``http://localhost:8080/ ``.
97
+ Optional: Use an additional ``.yml `` file from the scenarios folder to
98
+ apply one of the :doc: `pre-defined scenarios <docker-compose/docker-compose-scenarios >`.
99
+
100
+ After the stack is ready, you can access Zammad via the configured docker
101
+ host and port, e.g. ``http://localhost:8080/ ``.
102
+
103
+ Exposing the Stack via HTTPS
104
+ ----------------------------
105
+
106
+ To publish a Zammad stack on the internet, it needs be secured via the HTTPS
107
+ protocol. To achieve that without modifying the Zammad stack, you can:
108
+
109
+ - Use a reverse proxy like Nginx Proxy Manager (NPM). It has a GUI that provides
110
+ an easy `Letsencrypt <https://letsencrypt.org/ >`_ integration.
111
+ - Use a cloudflare tunnel, which provides SSL termination.
112
+
113
+ Both scenarios are covered in the
114
+ :doc: `Docker compose scenarios section <docker-compose/docker-compose-scenarios >`.
115
+
116
+ .. _customizing-stack :
97
117
98
118
Customizing the Zammad Stack
99
119
----------------------------
100
120
101
- Sometimes it's necessary to apply local changes to the Zammad docker stack, e.g. to
102
- include additional services. If you plan to do so, we recommend that you do not change
103
- the ``docker-compose.yml `` file, but instead create a local ``docker-compose.override.yml ``
104
- that includes all your modifications. Docker-Compose will
105
- `automatically load this file and merge its changes into your stack <https://docs.docker.com/compose/multiple-compose-files/merge/ >`_.
121
+ The Zammad stack can be customized by loading additional scenario files for
122
+ common use cases. For example, you can deploy the stack with an included Nginx
123
+ Proxy Manager (NPM) or with disabled Postgres or Elasticsearch services, in case
124
+ you already have these services running.
125
+
126
+ Please see the :doc: `Docker compose scenarios section <docker-compose/docker-compose-scenarios >`.
127
+
128
+ To adjust the stack and settings, use
129
+ :doc: `docker specific environment variables </install/docker-compose/environment >`.
106
130
107
131
.. toctree ::
108
132
:hidden:
109
133
:maxdepth: 1
110
134
111
135
/install/docker-compose/environment
136
+ /install/docker-compose/docker-compose-scenarios
137
+
112
138
113
139
How to Run Commands in the Stack
114
140
--------------------------------
@@ -117,20 +143,45 @@ The docker entrypoint script sets up environment variables required by Zammad
117
143
to function properly. That is why calling ``rails `` or ``rake `` on the console
118
144
should be done via one of the following methods:
119
145
120
- .. code-block :: sh
146
+ .. tabs ::
147
+
148
+ .. tab :: Via Portainer GUI
149
+
150
+ In your Portainer GUI, go to the container view and select the running
151
+ rails container from your Zammad stack. Click on the **Exec Console **
152
+ icon in the "Quick Actions" column.
153
+
154
+ .. figure :: /images/install/docker-compose/portainer/portainer-exec-console.png
155
+ :alt:
156
+ :width: 70%
157
+
158
+ In the "Execute" dialog, select the "rails console" entry point as you
159
+ can see in the screenshot:
160
+
161
+ .. figure :: /images/install/docker-compose/portainer/portainer-execute-command.png
162
+ :alt:
163
+ :width: 70%
164
+
165
+ .. tab :: Via console
166
+
167
+ Directly execute a specific command:
168
+
169
+ .. code-block :: sh
170
+
171
+ docker compose run --rm zammad-railsserver rails r ' ...your rails command here...'
121
172
122
- # Directly execute a specific command :
173
+ Run the interactive rails console to manually enter Rails commands :
123
174
124
- $ docker compose run --rm zammad-railsserver rails r ' ...your rails command here... '
175
+ .. code-block :: sh
125
176
126
- # Run the interactive rails console to manually enter Rails commands:
177
+ docker compose run --rm zammad-railsserver rails c
127
178
128
- $ docker compose run --rm zammad-railsserver rails c
179
+ Via `` docker exec ``:
129
180
130
- # Via 'docker exec':
181
+ .. code-block :: sh
131
182
132
- $ docker exec zammad-docker-compose-zammad-railsserver-1 /docker-entrypoint.sh rails r ' ...your rails command here...'
183
+ docker exec zammad-docker-compose-zammad-railsserver-1 /docker-entrypoint.sh rails r ' ...your rails command here...'
133
184
134
- If you need to retrieve information from the rails server, you can place
135
- for example ``pp `` (pretty print) in front of your rails command. This
136
- leads to an output in your terminal.
185
+ If you need to retrieve information from the rails server, you can place
186
+ for example ``pp `` (pretty print) in front of your rails command. This
187
+ leads to an output in your terminal.
0 commit comments