diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4396537 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.venv +pythonenv* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d8001ef..736e932 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,9 +8,9 @@ LABEL "com.github.actions.color"="blue" LABEL repository="https://github.com/josephbmanley/zappa-deploy-action" LABEL maintainer="Joseph Manley " -RUN yum install python3 -y +RUN yum install python3 python3-pip -y -RUN pip install zappa +RUN pip3 install virtualenv ADD entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh index f43c23f..70b58b9 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,12 +4,21 @@ set -e # Move to project directory cd $1 +# Config AWS profile +mkdir -p ~/.aws +echo "[default]" > ~/.aws/config +echo "region=${AWS_DEFAULT_REGION:-'us-east-1'}" >> ~/.aws/config + +echo "[default]" > ~/.aws/credentials +echo "aws_access_key_id=${AWS_ACCESS_KEY_ID}" >> ~/.aws/credentials +echo "aws_secret_access_key=${AWS_SECRET_ACCESS_KEY}" >> ~/.aws/credentials + # Install virtual environment -pip install virtualenv virtualenv .venv source ./.venv/bin/activate # Install requirements +pip install zappa pip install -r requirements.txt {