diff --git a/services/Dockerfile-bastion b/services/bastion/Dockerfile-bastion-app similarity index 100% rename from services/Dockerfile-bastion rename to services/bastion/Dockerfile-bastion-app diff --git a/services/bastion/build.sh b/services/bastion/build.sh new file mode 100644 index 0000000..c1c8dbc --- /dev/null +++ b/services/bastion/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source constants.sh + +docker build -t $APP_IMAGE_NAME:dev -f Dockerfile-bastion-app . diff --git a/services/bastion/constants.sh b/services/bastion/constants.sh new file mode 100644 index 0000000..6a11f1c --- /dev/null +++ b/services/bastion/constants.sh @@ -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 diff --git a/services/bastion/start.sh b/services/bastion/start.sh new file mode 100644 index 0000000..9127429 --- /dev/null +++ b/services/bastion/start.sh @@ -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 diff --git a/services/bastion/stop.sh b/services/bastion/stop.sh new file mode 100644 index 0000000..871ff06 --- /dev/null +++ b/services/bastion/stop.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source constants.sh + +docker rm -f $APP_CONTAINER_NAME