Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
__pycache__/
.git/
.serverless/
.gitignore
serverless.yml

*.env

Expand Down
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,25 @@ FROM python:3.13-alpine

WORKDIR /app

RUN apk add --no-cache \
nodejs \
npm \
bash

COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Copy Serverless config before installing plugins
COPY serverless.yml /app/serverless.yml

# Install Serverless Framework globally
RUN npm install -g serverless

# Install Serverless plugins
RUN serverless plugin install -n serverless-wsgi && \
serverless plugin install -n serverless-ssm-fetch && \
serverless plugin install -n serverless-python-requirements

COPY . /app

EXPOSE 5000
Expand Down
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ services:
- "${PORT}:${PORT}"
environment:
- API_KEY=${API_KEY}
- FLASK_DEBUG=1
- FLASK_DEBUG=1
- AWS_REGION=${AWS_REGION}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- SERVERLESS_ACCESS_KEY=${SERVERLESS_ACCESS_KEY}
- PORT=${PORT}
7 changes: 7 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
AWS_REGION=your-aws-region
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
SERVERLESS_ACCESS_KEY=your-serverless-key
API_KEY=any-key
PORT=local-port-eg-5000
FLASK_DEBUG=1