Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
cat << 'EOL' >/lib/systemd/system/container_name.service
[Unit]
Description=Docker_Description
Requires=docker.service network-online.target

[Service]

Restart=on-abnormal
WorkingDirectory=/opt/confluence/setup
ExecStartPre=docker-compose pull
ExecStart=/usr/bin/docker start -a container_name --force-recreate
ExecStop=/usr/bin/docker stop -t 2 container_name

[Install]
WantedBy=multi-user.target
EOL
systemctl enable container_name
systemctl start container_name
systemctl status container_name

...