1.5.1 • Published 5 years ago

@ekingdom/envs v1.5.1

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
5 years ago

dev-stacks

Docker-compose configuration files for development of Skinholdings projects in Test environment

Environments

ProjectDev hostnameLive
Skinscasinodev.skins.testenv.ioskins.casino
Drakemall.comdev.drakemall.comdrakemall.com
Drakemall.iodrakemall.io
Dragondev.drakemall.xyz
Drakecasedev.drakecase.rudrakecase.ru

Example of initial setup and deploy commands

git clone https://github.com/skinholdings/dev-stacks
cd dev-stacks

npm link

docker network create -d overlay --attachable global

dep-stack misc-deps
dep-stack drakemall

Shell variables:

  • DOCKER_DIR if set, shall be used to locate docker-compose.yml files (default: dev)
  • DOCKER_HOST if set, shall be used to define the machine where docker commands will be executed (default: localhost). This variable has to be set if you plan to deploy to testenv, ex:
    export DOCKER_HOST=dev.drakemall.testenv.io

Scripts

(Run npm link from the root of the project, before using scripts)

  • dep-stack - deploys selected .yml file to DOCKER_HOST (default: localhost), ex:
    dep-stack misc-deps
    dep-stack drakemall
  • images-from - prints names of all images used in selected .yml file, ex:
    images-from drakemall
  • rm-stacks - removes all currently running stacks, ex:
    rm-stacks
  • pull-images-from - pulls all images one by one to hard drive from selected .yml file, ex:
    pull-images-from misc-deps
  • docker-clean - removes dangling images and exited containers, ex:
    docker-clean

Docker

After stack is deployed, use these commands to your convenience:

docker service ls
docker service logs <service_id>
docker service logs <service_id> --follow
docker exec -it <container_id> <command>