[Unit] Description=Learnitive private Redis execution queue After=docker.service Requires=docker.service [Service] Type=simple Environment=LEARNITIVE_DEPLOYMENT=@@LEARNITIVE_DEPLOYMENT@@ EnvironmentFile=/etc/learnitive/redis.env ExecStartPre=@@LEARNITIVE_SITE_ROOT@@/public_html/deploy/learnitive/redis-container-control.sh prepare ExecStart=/usr/bin/docker run --rm --name learnitive-os-redis --label learnitive.deployment=@@LEARNITIVE_DEPLOYMENT@@ --pull=never -p 127.0.0.1:7387:6379 -v learnitive-os-redis-data:/data ${LEARNITIVE_REDIS_IMAGE} redis-server /data/learnitive.conf ExecStop=@@LEARNITIVE_SITE_ROOT@@/public_html/deploy/learnitive/redis-container-control.sh stop Restart=always RestartSec=3 TimeoutStartSec=30 TimeoutStopSec=20 NoNewPrivileges=true PrivateTmp=true ProtectHome=true ProtectSystem=strict ProtectKernelTunables=true ProtectKernelModules=true ProtectControlGroups=true RestrictSUIDSGID=true LockPersonality=true [Install] WantedBy=multi-user.target