-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from Boavizta/greenhack22
Greenhack22
- Loading branch information
Showing
29 changed files
with
3,034 additions
and
59 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 @@ | ||
.git |
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,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 |
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 |
---|---|---|
|
@@ -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" ] |
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 |
---|---|---|
@@ -1,3 +0,0 @@ | ||
import api | ||
import config | ||
import utils | ||
Oops, something went wrong.