Skip to content

sirber/docker-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Self-Hosted Infra

This project is the successor of this project. It is written in GoLang instead of Makefile. Ths biggest advantage is that in order to use the infra, you won't have to merge two git repositories, one for the infra, the other for services/.

Installation

A binary is automatically compiled by GitHub.

  • Download latest release
    • example: wget -O infra https://github.com/sirber/docker-infra/releases/download/0.3.0/infra
  • Move the downloaded binary infra to a folder in path
  • Make it executable: chmod a+x infra

Usage

In a peculiar folder, like ~/infra, init your infra by running infra init. A infra.jon config file will be created. Then, you can create folders and sub-folders for your services.

At minimum, a service must have a docker-compose.yml and be enabled by creating an empty file enabled.

Then, you are ready to start the infra! With infra up.

Best Practices

  • Use bind mount, to be able to backup your data
  • Set restart policy to "always"
  • Down your service before deleting it, or else it will run forever like a ghost!

Backup

You can do a full cold backup by running sudo infra backup. The backup will keep file permission, for the bind mounts. The archive file name is in the infra.json config file.

To restore, just extract the archive somewhere else (as root) and up it!

Development

TODO

About

Docker Self-Hosted Infra

Resources

License

Stars

Watchers

Forks

Packages

No packages published