Skip to content

Commit 9a65fe7

Browse files
authored
Fixes #674 - Changed commands for rails console in docker context
1 parent 8df535c commit 9a65fe7

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

admin/console.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ a shell (e.g. for automation).
3737

3838
.. code-block:: sh
3939
40-
$ docker compose run --rm zammad-railsserver rails r '{COMMAND}'
40+
$ docker compose run --rm zammad-railsserver bundle exec rails r '{COMMAND}'
4141
4242
.. tab:: Package Installation
4343

@@ -65,7 +65,7 @@ It allows you to run several commands inside it.
6565

6666
.. code-block:: sh
6767
68-
$ docker compose run --rm zammad-railsserver rails c
68+
$ docker compose run --rm zammad-railsserver bundle exec rails c
6969
7070
.. tip:: If you use Portainer to manage your Docker containers,
7171
you can even use a
Binary file not shown.

install/docker-compose.rst

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,38 +149,43 @@ should be done via one of the following methods:
149149

150150
In your Portainer GUI, go to the container view and select the running
151151
rails container from your Zammad stack. Click on the **Exec Console**
152-
icon in the "Quick Actions" column.
152+
icon in the "Quick Actions" column and on the **Connect** button.
153153

154154
.. figure:: /images/install/docker-compose/portainer/portainer-exec-console.png
155155
:alt:
156156
:width: 70%
157157

158-
In the "Execute" dialog, select the "rails console" entry point as you
159-
can see in the screenshot:
158+
Run the interactive rails console by executing:
160159

161-
.. figure:: /images/install/docker-compose/portainer/portainer-execute-command.png
162-
:alt:
163-
:width: 70%
160+
.. code-block::
161+
162+
bundle exec rails c
163+
164+
Directly execute a specific command:
165+
166+
.. code-block::
167+
168+
bundle exec rails r '...your rails command here...'
164169
165170
.. tab:: Via console
166171

167172
Directly execute a specific command:
168173

169174
.. code-block:: sh
170175
171-
docker compose run --rm zammad-railsserver rails r '...your rails command here...'
176+
docker compose run --rm zammad-railsserver bundle exec rails r '...your rails command here...'
172177
173-
Run the interactive rails console to manually enter Rails commands:
178+
Run the interactive rails console to manually enter rails commands:
174179

175180
.. code-block:: sh
176181
177-
docker compose run --rm zammad-railsserver rails c
182+
docker compose run --rm zammad-railsserver bundle exec rails c
178183
179-
Via ``docker exec``:
184+
Via ``docker compose exec``:
180185

181186
.. code-block:: sh
182187
183-
docker exec zammad-docker-compose-zammad-railsserver-1 /docker-entrypoint.sh rails r '...your rails command here...'
188+
docker compose exec zammad-railsserver bundle exec rails r '...your rails command here...'
184189
185190
If you need to retrieve information from the rails server, you can place
186191
for example ``pp`` (pretty print) in front of your rails command. This

0 commit comments

Comments
 (0)