diff --git a/docker/build.sh b/docker/build.sh new file mode 100755 index 00000000..0d912026 --- /dev/null +++ b/docker/build.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Builds the Docker image. +# Usage: +# ./docker/build.sh + +set -e + +# Checks that the home directory is the root of the project. +if [[ ! -f "store/requirements.txt" ]]; then + echo "Error: Please run this script from the root of the project." + exit 1 +fi + +# Builds the API Docker image. +docker build -t kscale-store -f docker/Dockerfile . + +# Log in to ECR. +# aws ecr get-login-password | docker login --username AWS --password-stdin ${WIKIBOT_ECR_URI} + +# Pushes the Docker image to ECR. +# docker tag kscale-store:latest ${WIKIBOT_ECR_URI}:latest +# docker push ${WIKIBOT_ECR_URI}:latest + +# Runs the Docker image locally. +# docker run kscale-store:latest diff --git a/docker/run.sh b/docker/run.sh new file mode 100755 index 00000000..50b7f124 --- /dev/null +++ b/docker/run.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Runs the Docker image. +# Usage: +# ./docker/run.sh + +# Exposes port 80 on the container to port 8080 on the host. +# Visible at http://localhost:8080 +docker run -p 8080:80 kscale-store:latest