You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB

  1. [Unit]
  2. Description=hashicorp vault on docker
  3. Documentation=https://github.com/hashicorp/vault
  4. Wants=docker.socket
  5. After=docker.service
  6. [Service]
  7. User=root
  8. Restart=always
  9. RestartSec=15s
  10. TimeoutStartSec=5
  11. LimitNOFILE=10000
  12. ExecReload={{ docker_bin_dir }}/docker restart {{ vault_container_name }}
  13. ExecStop={{ docker_bin_dir }}/docker stop {{ vault_container_name }}
  14. ExecStartPre=-{{ docker_bin_dir }}/docker rm -f {{ vault_container_name }}
  15. # Container has the following internal mount points:
  16. # /vault/file/ # File backend storage location
  17. # /vault/logs/ # Log files
  18. ExecStart={{ docker_bin_dir }}/docker run \
  19. --name {{ vault_container_name }} --net=host \
  20. --cap-add=IPC_LOCK \
  21. -v {{ vault_cert_dir }}:{{ vault_cert_dir }} \
  22. -v {{ vault_config_dir }}:{{ vault_config_dir }} \
  23. -v {{ vault_etcd_cert_dir }}:{{ vault_etcd_cert_dir }} \
  24. -v {{ vault_log_dir }}:/vault/logs \
  25. -v {{ vault_roles_dir }}:{{ vault_roles_dir }} \
  26. -v {{ vault_secrets_dir }}:{{ vault_secrets_dir }} \
  27. --entrypoint=vault \
  28. {{ vault_image_repo }}:{{ vault_image_tag }} \
  29. server --config={{ vault_config_dir }}/config.json
  30. [Install]
  31. WantedBy=multi-user.target