Skip to content

Commit

Permalink
Added a service file for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
grantcurell committed Jun 5, 2019
1 parent 8cc2969 commit 3cb6ba2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ There are also some other environment variables that can be set to customize the

Those environment variables is what you can configure by running the installer for a default install, plus other useful ones.

As a convenience a premade service file `otrs.service` is included as part of the repository. To use it you will need to update `/opt/docker-otrs/docker-compose-prod.yml` to the path to your docker compose file, copy the service file from the repository to `/usr/lib/systemd/system/`, and run the command `systemctl daemon-reload`. You will then be able to use systemd to control your container.

### Docker Secrets
In order to keep your repositories and images free from any sensitive information you can specify a path to you secrets file to deploy the container easier and safer within a docker swarm/kubernetes environment. You can store any key/value-pair from the list above exactly like the `.env` file.

Expand Down
14 changes: 14 additions & 0 deletions otrs.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description = OTRS Docker Container Service

Wants = network.target
Requires = docker.service

[Service]
Type = simple

ExecStart = /usr/bin/docker-compose -p otrs -f /opt/docker-otrs/docker-compose-prod.yml up
ExecStop = /usr/bin/docker-compose -p otrs -f /opt/docker-otrs/docker-compose-prod.yml down

[Install]
WantedBy = multi-user.target

0 comments on commit 3cb6ba2

Please sign in to comment.