__devenv
This commit is contained in:
parent
922879016e
commit
4a1bfe174a
77
README.md
77
README.md
@ -1,53 +1,28 @@
|
||||
Folgende Kommandos müssen abgebildet werden:
|
||||
# Stack-Up dev-env
|
||||
## Introduction
|
||||
This project is the development environment of all stack-up projects.
|
||||
It simplifies handling different docker-enabled applications and their maintenance.
|
||||
|
||||
befehle:
|
||||
denv
|
||||
- init -> call script
|
||||
- update -> call script
|
||||
## Installation
|
||||
- Create a .systems file bases on .systems.example: `cp .systems.example .systems`
|
||||
- Enter all systems in the created file `nano .systems`
|
||||
- run `./init`. Init will:
|
||||
- update `.aliases` file, which enables you to switch between your systems easily via `goto-<system-identifier>`
|
||||
- updates `.profile` to use the updated aliases, enables the dev-env binaries (denv, drun, dcom, ...) and add some utility functions
|
||||
- clones all systems defined in `.systems`
|
||||
- calls the `bin/script/init` script for all cloned systems.
|
||||
- Perform init actions on systems
|
||||
- `./up` to start your containers
|
||||
- up will also run all the `bin/script/firstRun` scripts, if the `.firstRun` marker is missing
|
||||
|
||||
- build -> dcom
|
||||
- stop -> dcom
|
||||
- down -> dcom
|
||||
- up -> dcom
|
||||
|
||||
drun
|
||||
- docker exec
|
||||
- examples:
|
||||
drun composer install # Executes composer install in container associated with current directory
|
||||
drun weedkeeper-backend composer install # Executes composer install in weedkeeper-backend container
|
||||
|
||||
dcom
|
||||
- build
|
||||
- stop
|
||||
- down
|
||||
- up
|
||||
- examples:
|
||||
dcom build # Executes docker compose build with docker-compose file located in docker/
|
||||
dcom weedkeeper-backend build # Executes docker compose build with docker-compose file located in weedkeeper-backend/docker/
|
||||
|
||||
|
||||
dev-env:
|
||||
bin:
|
||||
denv
|
||||
drun
|
||||
dcom
|
||||
script:
|
||||
init
|
||||
clone
|
||||
update
|
||||
|
||||
docker:
|
||||
build
|
||||
stop
|
||||
down
|
||||
up -d
|
||||
|
||||
|
||||
system:
|
||||
.env
|
||||
script
|
||||
init
|
||||
update
|
||||
firstRun
|
||||
docker
|
||||
docker-compose.yml
|
||||
## Usage
|
||||
After the installation was performed successfully and you've sourced your ~/.profile file, you'll have access to the following utilities:
|
||||
- denv
|
||||
- without a parameter, navigates to the development environment
|
||||
- if a parameter is specified, denv will try to execute the passed script in the dev-env base folder
|
||||
- drun
|
||||
- executes a command on the app container of a system
|
||||
- dcom
|
||||
- executes a docker compose command.
|
||||
- without a parameter, for the system of the current directory
|
||||
- with a parameter, for the supplied system-id
|
||||
7
down
7
down
@ -3,8 +3,9 @@
|
||||
ENV_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
source $ENV_DIR/bin/denv_msg
|
||||
|
||||
denv_info_msg "Executing down dev-env"
|
||||
docker compose -f "$ENV_DIR/docker/docker-compose.yml" down
|
||||
|
||||
$ENV_DIR/script/foreachSystem/dcom down
|
||||
echo ""
|
||||
|
||||
$ENV_DIR/script/foreachSystem/dcom down
|
||||
denv_info_msg "Executing down dev-env"
|
||||
docker compose -f "$ENV_DIR/docker/docker-compose.yml" down
|
||||
6
stop
6
stop
@ -3,8 +3,8 @@
|
||||
ENV_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
source $ENV_DIR/bin/denv_msg
|
||||
|
||||
denv_info_msg "Executing stop dev-env"
|
||||
docker compose -f "$ENV_DIR/docker/docker-compose.yml" stop
|
||||
$ENV_DIR/script/foreachSystem/dcom stop
|
||||
echo ""
|
||||
|
||||
$ENV_DIR/script/foreachSystem/dcom stop
|
||||
denv_info_msg "Executing stop dev-env"
|
||||
docker compose -f "$ENV_DIR/docker/docker-compose.yml" stop
|
||||
Loading…
Reference in New Issue
Block a user