Skip to content

Commit

Permalink
Merge pull request #37 from Boavizta/greenhack22
Browse files Browse the repository at this point in the history
Greenhack22
  • Loading branch information
bpetit authored Nov 11, 2022
2 parents 7422675 + 9ade4a0 commit f279937
Show file tree
Hide file tree
Showing 29 changed files with 3,034 additions and 59 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
32 changes: 32 additions & 0 deletions .github/workflows/greenhack22.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish release

on:
push:
branches:
- 'greenhack22'

jobs:

docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Python 3
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Build docker image
run: docker build . --tag ghcr.io/boavizta/boagent:greenhack22 --cache-from ghcr.io/boavizta/boagent:greenhack22

- name: Push docker image
run: docker push ghcr.io/boavizta/boagent:greenhack22
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ LABEL org.opencontainers.image.authors="[email protected]"

RUN apt update && apt install gcc g++ -y

RUN apt-get install -y cron sqlite3

RUN useradd -ms /bin/bash boagent

USER boagent
#USER boagent

WORKDIR /home/boagent

COPY . .
COPY requirements.txt requirements.txt

RUN pip3 install -r requirements.txt

ENV PATH $PATH:/home/boagent/.local/bin

COPY . .

EXPOSE 8000

ENTRYPOINT [ "/bin/bash", "-c", "cd boagent/api && uvicorn api:app --host 0.0.0.0" ]
5 changes: 4 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ verify_ssl = true
name = "pypi"

[packages]
pydantic = '*'
fastapi = '0.75.2'
uvicorn = '*'
pandas = '*'
Expand All @@ -14,6 +13,10 @@ boaviztapi-sdk='0.1.2'
cpuid='0.0.10'
py-cpuinfo='8.0.0'
dataclasses='0.8'
requests = "*"
sqlalchemy = "*"
pydantic = {extras = ["dotenv"], version = "*"}
croniter = "*"

[dev-packages]
mkdocs = '*'
Expand Down
3 changes: 0 additions & 3 deletions boagent/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
import api
import config
import utils
Loading

0 comments on commit f279937

Please sign in to comment.