Skip to content

Commit 4ab3b67

Browse files
authored
Merge pull request #6 from Hermsi1337/develop
Ensure more systemd-reliability
2 parents 0e30025 + 89a2bc4 commit 4ab3b67

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

installer.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ func getServiceName(projectName string) string {
7474

7575
const serviceTemplate = `[Unit]
7676
Description={{ .ProjectName }} Service
77-
After=network.target
77+
After=network.service docker.service
78+
Requires=docker.service
7879
7980
[Service]
8081
Restart=always
@@ -87,7 +88,7 @@ ExecStop=/usr/bin/env docker-compose -p "{{ .ProjectName }}" -f "{{ .DockerCompo
8788
ExecStopPost=/usr/bin/env docker-compose -p "{{ .ProjectName }}" -f "{{ .DockerComposeFile }}" down
8889
8990
[Install]
90-
WantedBy=network-online.target
91+
WantedBy=docker.service
9192
`
9293

9394
type serviceDefinition struct {

0 commit comments

Comments
 (0)