-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
740a941
commit c562be9
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Docker deployment | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
name: Push Docker images | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Push Docker Hub | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
repository: loscrackitos/transport-api | ||
tags: latest | ||
tag_with_ref: true | ||
push: ${{ startsWith(github.ref, 'refs/tags/') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM python:3.7-alpine | ||
WORKDIR /api | ||
ENV FLASK_APP api.py | ||
ENV FLASK_RUN_HOST 0.0.0.0 | ||
RUN apk add --no-cache git tk-dev gcc musl-dev linux-headers | ||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
EXPOSE 5000 | ||
COPY . . | ||
CMD ["flask", "run"] |