__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:
|
## Installation
|
||||||
denv
|
- Create a .systems file bases on .systems.example: `cp .systems.example .systems`
|
||||||
- init -> call script
|
- Enter all systems in the created file `nano .systems`
|
||||||
- update -> call script
|
- 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
|
## Usage
|
||||||
- stop -> dcom
|
After the installation was performed successfully and you've sourced your ~/.profile file, you'll have access to the following utilities:
|
||||||
- down -> dcom
|
- denv
|
||||||
- up -> dcom
|
- 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
|
- drun
|
||||||
- docker exec
|
- executes a command on the app container of a system
|
||||||
- examples:
|
- dcom
|
||||||
drun composer install # Executes composer install in container associated with current directory
|
- executes a docker compose command.
|
||||||
drun weedkeeper-backend composer install # Executes composer install in weedkeeper-backend container
|
- without a parameter, for the system of the current directory
|
||||||
|
- with a parameter, for the supplied system-id
|
||||||
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
|
|
||||||
7
down
7
down
@ -3,8 +3,9 @@
|
|||||||
ENV_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
ENV_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
source $ENV_DIR/bin/denv_msg
|
source $ENV_DIR/bin/denv_msg
|
||||||
|
|
||||||
denv_info_msg "Executing down dev-env"
|
|
||||||
docker compose -f "$ENV_DIR/docker/docker-compose.yml" down
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
$ENV_DIR/script/foreachSystem/dcom down
|
$ENV_DIR/script/foreachSystem/dcom down
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
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 )
|
ENV_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
source $ENV_DIR/bin/denv_msg
|
source $ENV_DIR/bin/denv_msg
|
||||||
|
|
||||||
denv_info_msg "Executing stop dev-env"
|
$ENV_DIR/script/foreachSystem/dcom stop
|
||||||
docker compose -f "$ENV_DIR/docker/docker-compose.yml" stop
|
|
||||||
echo ""
|
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