This directory contains GitHub Actions workflows that automate various processes for the Smart Legal Assistance Platform.
- Frontend: Next.js, Tailwind CSS
- Backend: Django (see the
main-backendbranch)
You can explore and test the full API using the Postman documentation below:
🔗 Smart Legal Assistance API – Postman Docs
🔁 Note: The backend code is located on a separate branch named
main-backend.
To run the frontend web app on your local machine:
git clone https://github.com/AASTUSoftwareEngineeringDepartment/SmartLegalAssistanceAttorneyFindingPlatform.git
cd your-repo-name
npm install
npm run devThen visit http://localhost:3000 in your browser.
File: .github/workflows/docker-build.yml
This workflow automatically builds and pushes Docker images for the backend whenever changes are made to Python files, requirements.txt, Dockerfile, or docker-compose.yml.
- Triggers on pushes to the
mainbranch and pull requests tomain - Builds the Docker image using the
Dockerfile - Tags the image with both the commit SHA and
latest - Pushes the image to DockerHub (only for pushes to
main, not pull requests) - Runs basic tests to ensure the build is functional
- Updates the deployment via Render webhook (if configured)
The Dockerfile is based on python:3.12-slim and:
- Installs system dependencies such as
build-essentialandlibpq-dev - Sets environment variables for optimized Python behavior
- Installs Python packages from
requirements.txt - Copies all project files into the container
- Sets the working directory to
/app/backend - Automatically runs Django migrations and launches the app using Gunicorn
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
COPY . /app/
WORKDIR /app/backend
CMD ["sh", "-c", "python manage.py makemigrations && python manage.py migrate && gunicorn legal.wsgi:application --bind 0.0.0.0:$PORT"]To use this workflow, you need to set up the following secrets in your GitHub repository:
DOCKERHUB_USERNAME: Your DockerHub usernameDOCKERHUB_TOKEN: Your DockerHub access token (not your password)RENDER_DEPLOY_HOOK: The webhook URL provided by Render for automatic deployments
- Go to your GitHub repository
- Navigate to Settings > Secrets and variables > Actions
- Click "New repository secret"
- Add each of the required secrets
If the workflow isn't working as expected:
- Check that you've added all required secrets
- Verify your DockerHub credentials are correct
- Make sure your
Dockerfileis valid and builds successfully locally - Check the GitHub Actions logs for any specific error messages


