Skip to content

Commit e2cfdb7

Browse files
authored
Merge pull request SpokaneTech#139 from SpokaneTech/joeriddles/fix-prod-deployment
2 parents 545ccf6 + a5a15ba commit e2cfdb7

File tree

7 files changed

+42
-1916
lines changed

7 files changed

+42
-1916
lines changed

.github/workflows/django_check.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
7+
jobs:
8+
ruff:
9+
runs-on: ubuntu-latest
10+
name: Check Django
11+
steps:
12+
- name: "Checkout Repo"
13+
uses: actions/checkout@v4
14+
- name: Check Django
15+
uses: dagger/dagger-for-github@v5
16+
with:
17+
verb: call
18+
args: "linters check-django"
19+
version: "0.12.6"

dagger/src/linters.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from asyncio import CancelledError, TaskGroup
33

44
import dagger
5-
from dagger import object_type, function
5+
from dagger import function, object_type
66

77

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

22+
@function
23+
async def check_django(self) -> str:
24+
"""
25+
Run Django system checks.
26+
"""
27+
return await self.run_linter(["src/manage.py", "check"])
28+
2229
@function
2330
async def check(self) -> str:
2431
"""
@@ -68,6 +75,7 @@ async def all(self) -> str:
6875
# Run all the linters
6976
async with TaskGroup() as tg:
7077
tasks = [
78+
tg.create_task(self.check_django()),
7179
tg.create_task(self.check()),
7280
tg.create_task(self.format()),
7381
tg.create_task(self.bandit()),

docker-compose.yml

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
services:
2+
app:
3+
image: spokanetech:latest
4+
build:
5+
context: .
6+
container_name: app
7+
ports:
8+
- "8000:8000"
9+
env_file:
10+
- .env
11+
212
worker:
313
image: spokanetech:latest
414
build:

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies = [
3030
"python-dotenv>=1.0.1",
3131
"sentry-sdk[celery,django]>=2.1.1",
3232
"sqlparse>=0.4.4",
33+
"pillow>=10.4.0",
3334
]
3435

3536
[project.optional-dependencies]

requirements.dev.lock

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ pbr==6.1.0
242242
# via stevedore
243243
pillow==10.4.0
244244
# via
245+
# spokanetech (pyproject.toml)
245246
# cairosvg
246247
# mkdocs-material
247248
platformdirs==4.2.2

requirements.lock

+2
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ oauthlib==3.2.2
176176
# via requests-oauthlib
177177
packaging==24.1
178178
# via gunicorn
179+
pillow==10.4.0
180+
# via spokanetech (pyproject.toml)
179181
portalocker==2.10.1
180182
# via msal-extensions
181183
prometheus-client==0.20.0

uv.lock

-1,915
This file was deleted.

0 commit comments

Comments
 (0)