feat(bastion): move Bastion setup to task model
fix: Dockerfile name
This commit is contained in:
parent
d84dfe0ec2
commit
2750484eec
5 changed files with 28 additions and 0 deletions
5
services/bastion/build.sh
Normal file
5
services/bastion/build.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
source constants.sh
|
||||
|
||||
docker build -t $APP_IMAGE_NAME:dev -f Dockerfile-bastion-app .
|
6
services/bastion/constants.sh
Normal file
6
services/bastion/constants.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
export APP_NAME="bastion"
|
||||
export APP_CONTAINER_NAME=$APP_NAME-app
|
||||
export APP_IMAGE_NAME=$CONTAINER_NAME_PREFIX-$APP_CONTAINER_NAME
|
||||
export NETWORK_NAME=$APP_NAME-local
|
12
services/bastion/start.sh
Normal file
12
services/bastion/start.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
source constants.sh
|
||||
|
||||
docker network create $NETWORK_NAME || echo "Network $NETWORK_NAME already exists"
|
||||
|
||||
docker run \
|
||||
--detach \
|
||||
--network $NETWORK_NAME \
|
||||
--name $APP_CONTAINER_NAME \
|
||||
--env-file $ENV_FILE_DIR/bastion.env \
|
||||
$APP_IMAGE_NAME:dev
|
5
services/bastion/stop.sh
Normal file
5
services/bastion/stop.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
source constants.sh
|
||||
|
||||
docker rm -f $APP_CONTAINER_NAME
|
Reference in a new issue