• Stars
    star
    185
  • Rank 208,271 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

dcsg is a command-line utility for Linux that generates systemd services for Docker Compose projects

dcsg: A systemd service generator for docker-compose

dcsg is a command-line utility for Linux that generates systemd services for Docker Compose projects.

If you have one or more docker compose projects running on your server you might want create a systemd service for each of them.

And dcsg is here to help you with just that. Quickly create systemd services from docker-compose files.

Animation: Using dcsg on a docker-compose project

Usage

dcsg <action> [<path-to-a-docker-compose-file>] [<docker-compose-project-name]>

Install

Register a Docker Compose project as a systemd service:

dcsg install docker-compose.yml

Uninstall

Uninstall the systemd service for the given Docker Compose project:

dcsg uninstall docker-compose.yml

Help

Show the available actions and arguments:

dcsg help

The help for a specific action:

dcsg install --help

What does dcsg do?

dcsg doesn't do much.

For the install action dcsg creates a systemd service (see: installer.go):

  1. Create a systemd service definition in /etc/systemd/system/<project-name>.service
  2. Execute systemctl daemon-reload, enable and start

The name of the service created will be the project name of your docker-compose project.

For the uninstall action dcsg remove the systemd service it created earlier (see: uninstaller.go):

  1. Execute a systemctl stop and disable for the docker-compose service
  2. Delete the systemd service definition from /etc/systemd/system/<project-name>.service
  3. Execute sytemctl daemon-reload

Download

You can download pre-built binaries for Linux (64bit, ARM 5, ARM 6 and ARM 7) from github.com » andreaskoch » dcsg » releases:

curl -L https://github.com/andreaskoch/dcsg/releases/download/v0.4.0/dcsg_linux_amd64 > /usr/local/bin/dcsg
chmod +x /usr/local/bin/dcsg

Build

If you have go installed you can use go get to fetch and build dcsg:

go get github.com/andreaskoch/dcsg

To cross-compile dcsg for the different Linux architectures (AMD64, ARM5, ARM6 and ARM7) you can use the crosscompile action of the make script:

go get github.com/andreaskoch/dcsg
cd $GOPATH/github.com/andreaskoch/dcsg
make crosscompile

Licensing

»dcsg« is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

More Repositories

1

allmark

A cross-platform markdown web server
Go
314
star
2

dockerized-magento

A dockerized Magento Community Edition 1.9.x
Shell
278
star
3

go-fswatch

fswatch is a go library for monitoring filesystem changes that does not depend on inotify
Go
59
star
4

gargantua

The fast website crawler
Go
34
star
5

togglcsv

Toggl⥃CSV is a command line utility for Windows, Mac OS and Linux that imports or exports time reports to and from a Toggl account via CSV files
Go
17
star
6

go-autobuild

autobuild your go projects
Go
8
star
7

MagentoTutorial

Magento Development Tutorial
8
star
8

ga-spam-control

Command-line utility for blocking referrer spam from your Google Analytics accounts
Go
6
star
9

dotman

A tool to bootstrap your system configuration files
Go
5
star
10

go-fswatcher

fswatcher is a cross platform filesystem watcher which allows you to execute a custom command every time a file or folder changes
Go
4
star
11

Hostfile-Manager

The Hostfile Manager is a free and simple .NET 4.0 based WPF application that allows you to view, edit and manage your local machines' hosts file.
C#
4
star
12

soapui-project-normalization

A cross-platform SoapUI project file normalization utility written in Go
Go
3
star
13

togglapi

A go wrapper for the Toggl API
Go
3
star
14

SignalKo-SystemMonitor

A web-based system monitor that collects server performance data, distributes it via SignalR and displays the data using KnockoutJS.
JavaScript
3
star
15

reverse-proxy

A Nginx based reverse proxy or one or more sites on one ip address as a docker image
Shell
3
star
16

docker-prometheus-monitoring

Monitoring for Docker hosts using Prometheus
2
star
17

tekpub-catcher

A command-line tool that downloads your Tekpub videos and gives them sensible names
Go
2
star
18

docker-registry-with-authentication

A private docker registry that used a NGINX reverse proxy to add basic authentication
Shell
2
star
19

postdeploy

postdeploy is a cross-platform deployment-hook listener written in go
Go
2
star
20

alexa-ops

The 24/7 endpoint for your "Amazon Echo" based DevOPS skills
1
star
21

dee-cli

Cross-platform command-line utility for DNS updates via DNSimple
Go
1
star
22

dee-ns

A go-library for reading and updating DNS records
Go
1
star
23

NuDeploy

Tool for Nuget-based Deployments
C#
1
star
24

pandoc

A docker image for running the latest version of pandoc built from source
1
star