Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: push
jobs:
backend-check:
name: "Backend Check"
uses: pennlabs/shared-actions/.github/workflows/django.yaml@238aa5ee908afba9f906641b51f82bb81572f66a
uses: pennlabs/shared-actions/.github/workflows/django.yaml@b227580b1791e5812e58c1244595452fc848eff5
secrets: inherit
with:
projectName: pennmobile
Expand All @@ -15,10 +15,11 @@ jobs:
flake: true
black: true
ruff: false
dependencyManager: uv

frontend-check:
name: "Frontend Check"
uses: pennlabs/shared-actions/.github/workflows/react.yaml@238aa5ee908afba9f906641b51f82bb81572f66a
uses: pennlabs/shared-actions/.github/workflows/react.yaml@b227580b1791e5812e58c1244595452fc848eff5
with:
path: frontend
imageName: penn-mobile-frontend
Expand Down
14 changes: 11 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
FROM pennlabs/django-base:b269ea1613686b1ac6370154debbb741b012de1a-3.11
FROM pennlabs/django-base:11d476546bd11c7a499e0e93be8db6af035d360f-3.11

LABEL maintainer="Penn Labs"

# Copy project dependencies
COPY Pipfile* /app/
COPY pyproject.toml uv.lock /app/

# Install project dependencies
RUN pipenv install --system
RUN uv sync --frozen --no-dev --no-install-project --python $(which python); \
ln -s /app/.venv/bin/uwsgi /usr/local/bin/uwsgi; \
ln -s /app/.venv/bin/gunicorn /usr/local/bin/gunicorn

# Make installed binaries available for POSIX compliant scripts
ENV PATH="/app/.venv/bin:$PATH"

# Patch for scripts that use a hard-coded path to python (django-run, asgi-run)
ENV PYTHONPATH="/app/.venv/lib/python3.11/site-packages/:$PYTHONPATH"

Check warning on line 17 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Build backend

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$PYTHONPATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

# Copy project files
COPY . /app/

ENV DJANGO_SETTINGS_MODULE pennmobile.settings.production

Check warning on line 22 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Build backend

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV SECRET_KEY 'temporary key just to build the docker image'

Check warning on line 23 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Build backend

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "SECRET_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 23 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Build backend

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# Collect static files
RUN python3 /app/manage.py collectstatic --noinput
54 changes: 0 additions & 54 deletions backend/Pipfile

This file was deleted.

Loading
Loading