Skip to content

Commit

Permalink
update Dockerfile and port
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheila-nk committed Jun 13, 2024
1 parent 7055877 commit 2f926bc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ RUN chown -R $USERNAME:$USERNAME /customer-orders-service

USER $USERNAME

EXPOSE 8000

RUN ["chmod", "+x", "./commands.sh"]

ENTRYPOINT ["./commands.sh"]
CMD ["./commands.sh"]
2 changes: 1 addition & 1 deletion commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

flask db upgrade head

gunicorn -w 2 -b 0.0.0.0 'customer_orders_service:create_app()'
gunicorn -w 2 -b 0.0.0.0:$PORT 'customer_orders_service:create_app()'
3 changes: 0 additions & 3 deletions heroku.yml

This file was deleted.

4 changes: 3 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
from customer_orders_service import create_app


if __name__ == "__main__":
app = create_app()
app.run(debug=True)
port = os.environ.get('PORT', 8000)
app.run(debug=False, port=port)

0 comments on commit 2f926bc

Please sign in to comment.