-
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.
* initial commit for docker container * using nginx is not necessary * added ci to create container * try to make everythin run with gunicorn * minor chagnes and dockerignore
- Loading branch information
Showing
8 changed files
with
56 additions
and
1,947 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,2 @@ | ||
*/.venv | ||
*/*.lock |
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,26 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the app container | ||
run: docker build -t benniwi/airodor-wifi:latest --file ./container/Dockerfile . | ||
- name: docker login | ||
env: | ||
DOCKER_USER: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
run: | | ||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
- name: docker push image | ||
run: docker push benniwi/airodor-wifi:latest |
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
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,5 @@ | ||
from app import app | ||
|
||
|
||
if __name__ == '__main__': | ||
app.run() |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
FROM python:latest | ||
|
||
# prepare python | ||
RUN pip3 install poetry gunicorn | ||
|
||
# copy application | ||
RUN mkdir /app | ||
COPY ./airodor_wifi_api/ /app/airodor_wifi_api | ||
COPY ./airodor_web_app/ /app/airodor_web_app | ||
|
||
WORKDIR /app/airodor_web_app/airodor_web_app | ||
|
||
# prepare poetry | ||
RUN poetry config virtualenvs.create false | ||
RUN poetry install --only main | ||
|
||
# listen on port | ||
EXPOSE 80/tcp | ||
|
||
# run on startup | ||
ENTRYPOINT gunicorn --workers 2 --bind 0.0.0.0:80 wsgi:app |