Skip to content

Commit

Permalink
changed gunicorn command
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 12, 2024
1 parent 9e76e9f commit 3aee960
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 1200

- name: Delete previous image from DigitalOcean Container Registry
run: |
IMAGE_TAG=$(echo $GITHUB_SHA | head -c7)
doctl registry repository delete-manifest ${{ secrets.DO_REGISTRY_NAME }}/deepface:$IMAGE_TAG --force
- name: Push image to DigitalOcean Container Registry
run: docker push ${{ secrets.DO_REGISTRY_NAME }}/deepface:$(echo $GITHUB_SHA | head -c7)

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ ENV PYTHONUNBUFFERED=1
# run the app (re-configure port if necessary)
WORKDIR /app/deepface/api/src
EXPOSE 5000
# CMD ["gunicorn", "--workers=1", "--timeout=3600", "--bind=0.0.0.0:5000", "app:create_app()"]
ENTRYPOINT [ "sh", "entrypoint.sh" ]
CMD ["gunicorn", "--workers=1", "--timeout=3600", "--bind=0.0.0.0:5000", "app:create_app()"]
# ENTRYPOINT [ "sh", "entrypoint.sh" ]
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
echo "Starting the application..."
exec "$@"

gunicorn -w 1 -b 0.0.0.0:5000 --timeout 7200 --log-level 'debug' --access-logfile - --access-logformat '%(h)s - - [%(t)s] "%(r)s" %(s)s %(b)s %(L)s' app:create_app
gunicorn -w 1 -b 0.0.0.0:5000 --timeout 7200 --log-level 'debug' --access-logfile - --access-logformat '%(h)s - - [%(t)s] "%(r)s" %(s)s %(b)s %(L)s' "app:create_app()"

0 comments on commit 3aee960

Please sign in to comment.