-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* switch to Flask, new GitHub Action workflows
- Loading branch information
1 parent
b225b03
commit fa2ea35
Showing
20 changed files
with
2,211 additions
and
1,674 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 @@ | ||
[flake8] | ||
max-line-length = 160 |
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,58 @@ | ||
--- | ||
################################# | ||
################################# | ||
## Super Linter GitHub Actions ## | ||
################################# | ||
################################# | ||
name: Lint Code Base | ||
|
||
# | ||
# Documentation: | ||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | ||
# | ||
|
||
############################# | ||
# Start the job on all push # | ||
############################# | ||
on: | ||
push: | ||
branches-ignore: [master] | ||
# Remove the line above to run when pushing to master | ||
pull_request: | ||
branches: [master] | ||
|
||
############### | ||
# Set the Job # | ||
############### | ||
jobs: | ||
build: | ||
# Name the Job | ||
name: Lint Code Base | ||
# Set the agent to run on | ||
runs-on: ubuntu-latest | ||
|
||
################## | ||
# Load all steps # | ||
################## | ||
steps: | ||
########################## | ||
# Checkout the code base # | ||
########################## | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
with: | ||
# Full git history is needed to get a proper list of changed files within `super-linter` | ||
fetch-depth: 0 | ||
|
||
################################ | ||
# Run Linter against code base # | ||
################################ | ||
- name: Lint Code Base | ||
uses: github/super-linter@v4 | ||
env: | ||
VALIDATE_ALL_CODEBASE: false | ||
VALIDATE_PYTHON_BLACK: true | ||
VALIDATE_PYTHON_FLAKE8: true | ||
# Change to 'master' if your main branch differs | ||
DEFAULT_BRANCH: master | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
*.pyc | ||
__pycache__ | ||
.venv/ | ||
dinghy_ping.egg-info/ |
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 @@ | ||
[settings] | ||
profile=black |
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,11 +1,33 @@ | ||
FROM kennethreitz/pipenv | ||
FROM python:3.10.4-buster | ||
|
||
ENV DD_SERVICE_NAME="dinghy-ping" | ||
ENV DD_AGENT_HOST=localhost | ||
ENV DD_DOGSTATSD_SOCKET="" | ||
ENV YOUR_ENV=${YOUR_ENV} \ | ||
PYTHONFAULTHANDLER=1 \ | ||
PYTHONUNBUFFERED=1 \ | ||
PYTHONHASHSEED=random \ | ||
PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 \ | ||
POETRY_VERSION=1.1.13 \ | ||
DD_SERVICE_NAME="dinghy-ping" \ | ||
DD_AGENT_HOST=localhost \ | ||
DD_DOGSTATSD_SOCKET="" | ||
|
||
EXPOSE 80/tcp 8000/tcp | ||
|
||
# System deps: | ||
RUN pip install "poetry==$POETRY_VERSION" | ||
|
||
# Copy only requirements to cache them in docker layer | ||
WORKDIR /app | ||
COPY poetry.lock pyproject.toml /app/ | ||
|
||
# Project initialization: | ||
RUN poetry config virtualenvs.create false \ | ||
&& poetry install --no-dev --no-interaction --no-ansi | ||
|
||
# Creating folders, and files for a project: | ||
COPY . /app | ||
EXPOSE 80/tcp | ||
|
||
ENV PYTHONPATH=/app/ | ||
CMD ddtrace-run python3 /app/dinghy_ping/services/api.py | ||
ENTRYPOINT ["./boot.sh"] | ||
# CMD ddtrace-run python /app/dinghy_ping/services/api.py |
Oops, something went wrong.