Skip to content

Commit

Permalink
Merge pull request #25 from zytedata/circleci
Browse files Browse the repository at this point in the history
Update Docker image and build process
  • Loading branch information
jsargiot authored Jul 7, 2023
2 parents 406edb0 + 3d58145 commit b06fad6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2

jobs:
build-and-publish:
docker:
- image: cimg/python:3.10

steps:
- checkout

- setup_remote_docker:
docker_layer_caching: true

- run:
name: Publish Docker image
command: |
# Build image
docker build \
-t ${DOCKER_REPO}/spidyquotes/${CIRCLE_BRANCH,,}:${CIRCLE_SHA1:0:7} \
.
# Docker login
docker login \
-u ${DOCKER_USER} \
-p ${DOCKER_PASS} \
${DOCKER_REPO}
# Push image
docker push \
${DOCKER_REPO}/spidyquotes/${CIRCLE_BRANCH,,}:${CIRCLE_SHA1:0:7}
workflows:
version: 2
build-and-publish-workflow:
jobs:
- build-and-publish
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM scrapinghub/python:3
FROM python:3.11-slim
EXPOSE 5000
WORKDIR /app
CMD ["/app/start-spidyquotes"]
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask==1.0
Flask-Limiter==0.8.5
gunicorn==19.6.0
awesome-slugify==1.6.5
Flask==2.3.2
Flask-Limiter==3.3.1
gunicorn==20.1.0
awesome-slugify==1.6.5

0 comments on commit b06fad6

Please sign in to comment.