Skip to content

Commit

Permalink
Merge pull request #139 from SpokaneTech/joeriddles/fix-prod-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
joeriddles authored Sep 2, 2024
2 parents 545ccf6 + a5a15ba commit e2cfdb7
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 1,916 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/django_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches:
- main
pull_request:

jobs:
ruff:
runs-on: ubuntu-latest
name: Check Django
steps:
- name: "Checkout Repo"
uses: actions/checkout@v4
- name: Check Django
uses: dagger/dagger-for-github@v5
with:
verb: call
args: "linters check-django"
version: "0.12.6"
10 changes: 9 additions & 1 deletion dagger/src/linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from asyncio import CancelledError, TaskGroup

import dagger
from dagger import object_type, function
from dagger import function, object_type


@object_type
Expand All @@ -19,6 +19,13 @@ async def run_linter(self, cmd: list[str]) -> str:
# The ExecError exposes the
raise LinterError(exec_error=e)

@function
async def check_django(self) -> str:
"""
Run Django system checks.
"""
return await self.run_linter(["src/manage.py", "check"])

@function
async def check(self) -> str:
"""
Expand Down Expand Up @@ -68,6 +75,7 @@ async def all(self) -> str:
# Run all the linters
async with TaskGroup() as tg:
tasks = [
tg.create_task(self.check_django()),
tg.create_task(self.check()),
tg.create_task(self.format()),
tg.create_task(self.bandit()),
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
services:
app:
image: spokanetech:latest
build:
context: .
container_name: app
ports:
- "8000:8000"
env_file:
- .env

worker:
image: spokanetech:latest
build:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies = [
"python-dotenv>=1.0.1",
"sentry-sdk[celery,django]>=2.1.1",
"sqlparse>=0.4.4",
"pillow>=10.4.0",
]

[project.optional-dependencies]
Expand Down
1 change: 1 addition & 0 deletions requirements.dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ pbr==6.1.0
# via stevedore
pillow==10.4.0
# via
# spokanetech (pyproject.toml)
# cairosvg
# mkdocs-material
platformdirs==4.2.2
Expand Down
2 changes: 2 additions & 0 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ oauthlib==3.2.2
# via requests-oauthlib
packaging==24.1
# via gunicorn
pillow==10.4.0
# via spokanetech (pyproject.toml)
portalocker==2.10.1
# via msal-extensions
prometheus-client==0.20.0
Expand Down
1,915 changes: 0 additions & 1,915 deletions uv.lock

This file was deleted.

0 comments on commit e2cfdb7

Please sign in to comment.