Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

UnknownHero/docker-compose-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Compose Boilerplate

Setup

  • Install Docker and Docker Compose
  • Copy example and set your CONTEXT name. cp -r src/example src/CONTEXT
  • For exampe ( 'local' is your CONTEXT name ): cp -r src/example src/local
  • Set your config for COMMON compose ( /src/common ) and CONTEXT compose ( for example /src/local )
  • Set your env files if need

Usage

  • Run docker for building images and running containers for your CONTEXT: ./run.sh CONTEXT
  • Get container output: ./output.sh CONTEXT CONTAINER
  • Get shell access to container: ./shell.sh CONTEXT CONTAINER
  • Restart container: ./restart.sh CONTEXT CONTAINER
  • Remove containers: ./remove.sh CONTEXT

DEFAULT CONTEXT

If you have only one CONTEXT and doesn't want write always CONTEXT name for commands, you can set your CONTEXT name = 'default'

For example: cp -r src/example src/default

Now you don't write CONTEXT name always for shell scripts. Enjoy!

Also you can customize name of default CONTEXT. Just edit name in default.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages