Skip to content

Instantly share code, notes, and snippets.

@CliffLin
Last active December 7, 2015 08:11
Show Gist options
  • Save CliffLin/dc23da085f11817b69aa to your computer and use it in GitHub Desktop.
Save CliffLin/dc23da085f11817b69aa to your computer and use it in GitHub Desktop.
  1. vim /etc/systemd/system/gitlab.service

  2. [gitlab.service]

[Unit]
Description=gitlab containers
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker start -a gitlabinstall_gitlab_1 gitlabinstall_redis_1 gitlabinstall_postgresql_1
ExecStop=/usr/bin/docker stop -t 2 gitlabinstall_gitlab_1 gitlabinstall_redis_1 gitlabinstall_postgresql_1
[Install]
WantedBy=local.target
  1. systemctl enable /etc/systemd/system/gitlab.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment