23 lines
871 B
Desktop File
23 lines
871 B
Desktop File
[Unit]
|
|
Description=Mistborn Elasticsearch Service
|
|
Requires=Mistborn-base.service
|
|
After=Mistborn-base.service
|
|
PartOf=Mistborn-base.service
|
|
|
|
[Service]
|
|
Restart=always
|
|
RestartSec=15
|
|
User=root
|
|
Group=docker
|
|
PermissionsStartOnly=true
|
|
# Shutdown container (if running) when unit is stopped
|
|
ExecStartPre=/usr/sbin/sysctl -w vm.max_map_count=262144
|
|
ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh elasticsearch docker-compose -f /opt/mistborn/extra/elasticsearch.yml down
|
|
# Start container when unit is started
|
|
ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh elasticsearch docker-compose -f /opt/mistborn/extra/elasticsearch.yml up --build
|
|
# Stop container when unit is stopped
|
|
ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh elasticsearch docker-compose -f /opt/mistborn/extra/elasticsearch.yml down
|
|
|
|
[Install]
|
|
WantedBy=Mistborn-base.service
|