Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 37cbb36

Browse files
authored
Merge pull request #116 from SELab-2/development
🎉 First release
2 parents 7ce6f35 + d579f26 commit 37cbb36

File tree

183 files changed

+11208
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+11208
-1
lines changed

.dev.env

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Default values
2+
PUID=1000
3+
PGID=1000
4+
TZ=Europe/Brussels
5+
6+
# File directories
7+
DATA_DIR="./data"
8+
BACKEND_DIR="./backend"
9+
FRONTEND_DIR="./frontend"
10+
SSL_DIR="./data/nginx/ssl"
11+
12+
# Redis
13+
REDIS_IP=192.168.90.10
14+
REDIS_PORT=6379
15+
16+
# Django
17+
DJANGO_SECRET_KEY="" # Set to a random string
18+
DJANGO_DEBUG=True # Django debug mode
19+
DJANGO_DOMAIN_NAME=localhost # Domain name for the Django server
20+
DJANGO_CAS_URL_PREFIX="" # URL prefix for the CAS server. Should be empty for development
21+
DJANGO_CAS_PORT=8080 # Port for the CAS server. Should be 8080 if DJANGO_DOMAIN_NAME is localhost
22+
DJANGO_DB_ENGINE=django.db.backends.sqlite3 # Database engine
23+
DJANGO_REDIS_HOST=${REDIS_IP} # Redis configuration
24+
DJANGO_REDIS_PORT=${REDIS_PORT}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: backend-linting
2+
3+
on:
4+
push:
5+
branches: [main, development]
6+
pull_request:
7+
branches: [main, development]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: self-hosted
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python 3.11
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.11"
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install flake8
23+
pip install -r ./backend/requirements.txt
24+
- name: Execute linting checks
25+
run: flake8 --config ./backend/.flake8 ./backend
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: backend-tests
2+
3+
on:
4+
push:
5+
branches: [main, development]
6+
pull_request:
7+
branches: [main, development]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: self-hosted
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python 3.11
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.11"
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install flake8
23+
pip install -r ./backend/requirements.txt
24+
- name: Compile translations
25+
run: django-admin compilemessages
26+
- name: Execute tests
27+
run: cd backend; python manage.py test

.github/workflows/deployement.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Deploy
12+
uses: appleboy/ssh-action@master
13+
with:
14+
host: ${{ secrets.HOST }}
15+
username: ${{ secrets.USERNAME }}
16+
key: ${{ secrets.SSH_KEY }}
17+
port: ${{ secrets.PORT }}
18+
script: |
19+
cd UGent-7
20+
docker-compose -f production.yml down
21+
${{ secrets.PULL_SCRIPT }}
22+
docker-compose -f production.yml build --no-cache
23+
docker-compose -f production.yml up -d

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.tool-versions
2+
.env
3+
.venv
4+
.idea
5+
.vscode
6+
data/*
7+
data/nginx/ssl/*
8+
data/postres*
9+
data/redis/*
10+
backend/data/production/*
11+
12+
/node_modules
13+
backend/staticfiles/*
14+
15+
!data/nginx/ssl/.gitkeep

.prod.env

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Default values
2+
PUID=1000
3+
PGID=1000
4+
TZ=Europe/Brussels
5+
6+
# File directories
7+
DATA_DIR="./data"
8+
BACKEND_DIR="./backend"
9+
FRONTEND_DIR="./frontend"
10+
SSL_DIR=""
11+
12+
# Postgress DB
13+
POSTGRES_IP=192.168.90.9
14+
POSTGRES_PORT=5432
15+
POSTGRES_DB=selab
16+
POSTGRES_USER=selab_user
17+
POSTGRES_PASSWORD="" # Set to desired password
18+
19+
# Redis
20+
REDIS_IP=192.168.90.10
21+
REDIS_PORT=6379
22+
23+
# Django
24+
DJANGO_SECRET_KEY="" # Set to a random string
25+
DJANGO_DEBUG=False # Django debug mode
26+
DJANGO_DOMAIN_NAME="" # Domain name for the Django server
27+
DJANGO_CAS_URL_PREFIX="" # URL prefix for the CAS server
28+
DJANGO_CAS_PORT="" # Port for the CAS server
29+
DJANGO_DB_ENGINE=django.db.backends.postgresql # Database engine configuration
30+
DJANGO_DB_NAME=${POSTGRES_DB}
31+
DJANGO_DB_USER=${POSTGRES_USER}
32+
DJANGO_DB_PASSWORD=${POSTGRES_PASSWORD}
33+
DJANGO_DB_HOST=${POSTGRES_IP}
34+
DJANGO_DB_PORT=${POSTGRES_PORT}
35+
DJANGO_REDIS_HOST=${REDIS_IP} # Redis configuration
36+
DJANGO_REDIS_PORT=${REDIS_PORT}

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
# UGent-7
1+
# Ypovoli
2+
3+
![backend linting](https://github.com/SELab-2/UGent-7/actions/workflows/backend-linting.yaml/badge.svg)
4+
![backend tests](https://github.com/SELab-2/UGent-7/actions/workflows/backend-tests.yaml/badge.svg)
5+
6+
This application was developed within the framework of the course "Software Engineering Lab 2" within the Computer Science program at Ghent University.
7+
8+
## Documentation
9+
10+
See our wiki at [https://github.com/SELab-2/UGent-7/wiki](https://github.com/SELab-2/UGent-7/wiki) for more detailed information on the project's architecture.

backend/.coverage

52 KB
Binary file not shown.

backend/.flake8

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[flake8]
2+
3+
# Ignore unused imports
4+
ignore = F401
5+
6+
max-line-length = 125
7+
8+
max-complexity = 10
9+
10+
exclude = .git,
11+
__pycache__,
12+
.venv,
13+
venv,
14+
migrations
15+

backend/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.venv
2+
.idea
3+
db.sqlite3
4+
__pycache__
5+
*.mo

0 commit comments

Comments
 (0)