Skip to content

Commit

Permalink
docker build and run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed May 20, 2024
1 parent d690dff commit 60c5615
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions docker/run.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 60c5615

Please sign in to comment.