-
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
0 parents
commit dfa0451
Showing
79 changed files
with
7,162 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,13 @@ | ||
DATABASE_URL=postgresql+asyncpg://app:app@app_db:5432/app | ||
REDIS_URL=redis://:myStrongPassword@redis:6379 | ||
|
||
SITE_DOMAIN=127.0.0.1 | ||
SECURE_COOKIES=false | ||
|
||
ENVIRONMENT=LOCAL | ||
|
||
CORS_HEADERS=["*"] | ||
CORS_ORIGINS=["http://localhost:3000"] | ||
|
||
# optional config | ||
REDIS_MAX_CONNECTIONS=128 |
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,36 @@ | ||
name: Run linter checks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
run_linters_tests: | ||
name: Run linters and tests | ||
runs-on: ubuntu-latest | ||
container: python:3.10.7 | ||
services: | ||
postgres: | ||
image: postgres:14.1 | ||
env: | ||
POSTGRES_PASSWORD: app | ||
POSTGRES_USER: app | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements/dev.txt | ||
continue-on-error: true | ||
- name: Lint with ruff | ||
run: | | ||
ruff src | ||
- name: Format with ruff | ||
run: | | ||
ruff format src --diff |
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,140 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.env.prefect | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
postgres-data* | ||
node_modules/ | ||
.DS_Store | ||
|
||
# PyCharm | ||
.idea/ | ||
backup.dump | ||
backup.dump.gz | ||
.vscode | ||
.python_history |
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 @@ | ||
FROM python:3.11-slim-buster | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y gcc libpq-dev && \ | ||
apt clean && \ | ||
rm -rf /var/cache/apt/* | ||
|
||
ENV PYTHONDONTWRITEBYTECODE=1 \ | ||
PYTHONUNBUFFERED=1 \ | ||
PYTHONIOENCODING=utf-8 | ||
|
||
# Install & setup Poetry | ||
RUN pip install -U pip && \ | ||
pip install --no-cache-dir poetry && \ | ||
poetry config virtualenvs.create false | ||
|
||
# Copy only requirements to cache them in docker layer | ||
WORKDIR /src | ||
COPY pyproject.toml poetry.lock /src/ | ||
|
||
# Project initialization: | ||
RUN poetry install --no-interaction --no-ansi --no-dev --no-root | ||
|
||
# Copying the rest of the project | ||
COPY . /src | ||
|
||
RUN useradd -m -d /src -s /bin/bash app \ | ||
&& chown -R app:app /src/* && chmod +x /src/scripts/* | ||
|
||
USER app | ||
|
||
ENTRYPOINT ["./scripts/start-dev.sh"] |
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,33 @@ | ||
FROM python:3.11-slim-buster | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y gcc libpq-dev && \ | ||
apt clean && \ | ||
rm -rf /var/cache/apt/* | ||
|
||
ENV PYTHONDONTWRITEBYTECODE=1 \ | ||
PYTHONUNBUFFERED=1 \ | ||
PYTHONIOENCODING=utf-8 | ||
|
||
# Install & setup Poetry | ||
RUN pip install -U pip && \ | ||
pip install --no-cache-dir poetry && \ | ||
poetry config virtualenvs.create false | ||
|
||
# Copy only requirements to cache them in docker layer | ||
WORKDIR /src | ||
COPY pyproject.toml poetry.lock /src/ | ||
|
||
# Project initialization: | ||
RUN poetry install --no-interaction --no-ansi --no-dev --no-root | ||
|
||
# Copying the rest of the project | ||
COPY . /src | ||
|
||
RUN useradd -m -d /src -s /bin/bash app \ | ||
&& chown -R app:app /src/* && chmod +x /src/scripts/* | ||
|
||
|
||
USER app | ||
|
||
CMD ["./scripts/start-prod.sh"] |
Oops, something went wrong.