Skip to content

Commit

Permalink
Merge branch 'master' into restart-on-newer-image
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 authored Feb 14, 2024
2 parents 4bd00ef + 80bb7ff commit 80cc7e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/systemd-docker-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Renders a systemd unit file that runs an application within a docker container.
| systemd_docker_cpu_period | | The CPU time period for the docker container to use |
| systemd_docker_cpu_quota | | The number of microseconds per period for the docker container to use |
| systemd_docker_memory | | The maximum amount of memory for the docker container to use |
| systemd_docker_log_driver | | The log driver to use for the container instead of the system default |
| systemd_service_restart_sec | | The number of seconds to wait before restarting the systemd service |
| systemd_service_timeout_start_sec | | The number of seconds to wait before starting the systemd service |
| systemd_service_timeout_stop_sec | | The number of seconds to wait for the systemd service to stop |
Expand All @@ -32,7 +33,7 @@ Renders a systemd unit file that runs an application within a docker container.

## Examples

```
```yaml
- name: deploy metal-core service
include_role:
name: systemd-docker-service
Expand Down
3 changes: 3 additions & 0 deletions roles/systemd-docker-service/templates/service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ ExecStart=/usr/bin/docker run --name=%n \
{% if systemd_docker_memory is defined %}
--memory {{ systemd_docker_memory }} \
{% endif %}
{% if systemd_docker_log_driver is defined %}
--log-driver {{ systemd_docker_log_driver }} \
{% endif %}
{% if systemd_docker_network %}
--network {{ systemd_docker_network }} \
{% endif %}
Expand Down

0 comments on commit 80cc7e2

Please sign in to comment.