Skip to content

tinbox/tinbox-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 

Repository files navigation

tinbox-docker

Docker orchestration for tinbox.

Overview

A work-in-progress overview of tinbox services and docker containers.

                             โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
                             โ”‚     nginx     โ”‚
                             โ•žโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ก
                             โ”‚      app      โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                             โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ           โ”‚
                                     โ”‚                   โ”‚
         โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
(IMAP)   โ”‚      mx       โ”œโ”€โ”€โ”€โ”ค      api      โ”‚   โ”‚     socker    โ”‚
         โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ•ฐโ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ•ฏ   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ•ฏ
                                โ”‚         โ”‚                   โ”‚
                   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ•ฎ   โ•ญโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ   โ•ญโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
                   โ”‚    postgres   โ”‚   โ”‚ elasticsearch โ”‚   โ”‚     redis     โ”‚   โ”‚   rabbitmq    โ”‚
                   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

         โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
         โ”‚    www_data   โ”‚
         โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Setup

Build tinbox docker image:

cd <tinbox repo>
# --force-rm not required but handy if something goes wrong
docker build --force-rm -t tinbox_api .

Build tinbox-mx docker image:

cd <tinbox-mx repo>
docker build --force-rm -t tinbox_mx .

Build tinbox-app docker image:

cd <tinbox-app repo>
docker build --force-rm -t tinbox_app .

Build remaining images (nginx, db, etc.):

cd <tinbox-docker repo>/tinbox
docker-compose build
mkdir -p /var/lib/docker/volumes/tinbox

Migrate database and collect static assets

docker-compose run --rm api migrate --noinput
docker-compose run --rm api collectstatic --noinput

Run

Start everything:

docker-compose up -d

Develop

For most cases an image can just be rebuild via compose.

docker-compose up -d api

This will rebuild/restart the api service along with dependent services, if needed. Pass --force-recreate to force the image to be re-created.

Misc handy commands

Rebuild (only) nginx container to get new app container data:

docker-compose up --force-recreate --no-deps -d nginx

Remove dangling images:

docker rmi $(docker images --quiet --filter "dangling=true")

About

Docker orchestration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •