mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 482e8c1357 | |||
| 0e0141d155 | |||
| 7f002e2e6a | |||
| 0064b8d35a | |||
| ec2c1daebc | |||
| 67cea2f1c6 | |||
| 5785bfae46 | |||
| a17078709b | |||
| d58155da06 | |||
| 043d93dcc4 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
.venv/
|
.venv/
|
||||||
.env
|
.env
|
||||||
node_modules/
|
node_modules/
|
||||||
hardcoded-strings-report.md
|
hardcoded-strings-report.md
|
||||||
|
backend.env
|
||||||
@ -1 +1 @@
|
|||||||
node scripts/prepare-commit-msg.js "$1" "$2"
|
#node scripts/prepare-commit-msg.js "$1" "$2"
|
||||||
@ -37,7 +37,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img src="{{URL_DJANGO}}static/img/logo_min.svg" alt="Logo N3wt School" class="logo" />
|
<img src="{{URL_DJANGO}}/static/img/logo_min.svg" alt="Logo N3wt School" class="logo" />
|
||||||
<h1>Confirmation de souscription</h1>
|
<h1>Confirmation de souscription</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
__version__ = "0.0.2"
|
__version__ = "0.0.3"
|
||||||
|
|||||||
@ -66,6 +66,7 @@ urllib3==2.2.3
|
|||||||
vine==5.1.0
|
vine==5.1.0
|
||||||
wcwidth==0.2.13
|
wcwidth==0.2.13
|
||||||
webencodings==0.5.1
|
webencodings==0.5.1
|
||||||
|
watchfiles
|
||||||
xhtml2pdf==0.2.16
|
xhtml2pdf==0.2.16
|
||||||
channels==4.0.0
|
channels==4.0.0
|
||||||
channels-redis==4.1.0
|
channels-redis==4.1.0
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
|
from watchfiles import run_process
|
||||||
|
|
||||||
def run_command(command):
|
def run_command(command):
|
||||||
process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
@ -11,6 +12,7 @@ def run_command(command):
|
|||||||
return process.returncode
|
return process.returncode
|
||||||
|
|
||||||
test_mode = os.getenv('test_mode', 'false').lower() == 'true'
|
test_mode = os.getenv('test_mode', 'false').lower() == 'true'
|
||||||
|
watch_mode = os.getenv('DJANGO_WATCH', 'false').lower() == 'true'
|
||||||
|
|
||||||
commands = [
|
commands = [
|
||||||
["python", "manage.py", "collectstatic", "--noinput"],
|
["python", "manage.py", "collectstatic", "--noinput"],
|
||||||
@ -32,23 +34,55 @@ test_commands = [
|
|||||||
["python", "manage.py", "init_mock_datas"]
|
["python", "manage.py", "init_mock_datas"]
|
||||||
]
|
]
|
||||||
|
|
||||||
for command in commands:
|
def run_daphne():
|
||||||
if run_command(command) != 0:
|
try:
|
||||||
exit(1)
|
result = subprocess.run([
|
||||||
|
"daphne", "-b", "0.0.0.0", "-p", "8080", "N3wtSchool.asgi:application"
|
||||||
|
])
|
||||||
|
return result.returncode
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Arrêt de Daphne (KeyboardInterrupt)")
|
||||||
|
return 0
|
||||||
|
|
||||||
#if test_mode:
|
if __name__ == "__main__":
|
||||||
# for test_command in test_commands:
|
for command in commands:
|
||||||
# if run_command(test_command) != 0:
|
if run_command(command) != 0:
|
||||||
# exit(1)
|
exit(1)
|
||||||
|
|
||||||
# Lancer les processus en parallèle
|
#if test_mode:
|
||||||
|
# for test_command in test_commands:
|
||||||
|
# if run_command(test_command) != 0:
|
||||||
|
# exit(1)
|
||||||
|
|
||||||
processes = [
|
if watch_mode:
|
||||||
subprocess.Popen(["daphne", "-b", "0.0.0.0", "-p", "8080", "N3wtSchool.asgi:application"]),
|
celery_worker = subprocess.Popen(["celery", "-A", "N3wtSchool", "worker", "--loglevel=info"])
|
||||||
subprocess.Popen(["celery", "-A", "N3wtSchool", "worker", "--loglevel=info"]),
|
celery_beat = subprocess.Popen(["celery", "-A", "N3wtSchool", "beat", "--loglevel=info", "--scheduler", "django_celery_beat.schedulers:DatabaseScheduler"])
|
||||||
subprocess.Popen(["celery", "-A", "N3wtSchool", "beat", "--loglevel=info", "--scheduler", "django_celery_beat.schedulers:DatabaseScheduler"])
|
try:
|
||||||
]
|
run_process(
|
||||||
|
'.',
|
||||||
# Attendre la fin des processus
|
target=run_daphne
|
||||||
for process in processes:
|
)
|
||||||
process.wait()
|
except KeyboardInterrupt:
|
||||||
|
print("Arrêt demandé (KeyboardInterrupt)")
|
||||||
|
finally:
|
||||||
|
celery_worker.terminate()
|
||||||
|
celery_beat.terminate()
|
||||||
|
celery_worker.wait()
|
||||||
|
celery_beat.wait()
|
||||||
|
else:
|
||||||
|
processes = [
|
||||||
|
subprocess.Popen([
|
||||||
|
"daphne", "-b", "0.0.0.0", "-p", "8080", "N3wtSchool.asgi:application"
|
||||||
|
]),
|
||||||
|
subprocess.Popen(["celery", "-A", "N3wtSchool", "worker", "--loglevel=info"]),
|
||||||
|
subprocess.Popen(["celery", "-A", "N3wtSchool", "beat", "--loglevel=info", "--scheduler", "django_celery_beat.schedulers:DatabaseScheduler"])
|
||||||
|
]
|
||||||
|
try:
|
||||||
|
for process in processes:
|
||||||
|
process.wait()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Arrêt demandé (KeyboardInterrupt)")
|
||||||
|
for process in processes:
|
||||||
|
process.terminate()
|
||||||
|
for process in processes:
|
||||||
|
process.wait()
|
||||||
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
Toutes les modifications notables apportées à ce projet seront documentées dans ce fichier.
|
Toutes les modifications notables apportées à ce projet seront documentées dans ce fichier.
|
||||||
|
|
||||||
|
### [0.0.3](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/compare/0.0.2...0.0.3) (2025-06-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Corrections de bugs
|
||||||
|
|
||||||
|
* Ajout d'un '/' en fin d'URL ([67cea2f](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/67cea2f1c6edae8eed5e024c79b1e19d08788d4c))
|
||||||
|
|
||||||
### 0.0.2 (2025-06-01)
|
### 0.0.2 (2025-06-01)
|
||||||
|
|
||||||
|
|
||||||
@ -161,7 +168,7 @@ Toutes les modifications notables apportées à ce projet seront documentées da
|
|||||||
* ajout de credential include dans get CSRF ([c161fa7](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/c161fa7e7568437ba501a565ad53192b9cb3b6f3))
|
* ajout de credential include dans get CSRF ([c161fa7](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/c161fa7e7568437ba501a565ad53192b9cb3b6f3))
|
||||||
* Ajout de l'établissement dans la requête KPI récupérant les ([ada2a44](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/ada2a44c3ec9ba45462bd7e78984dfa38008e231))
|
* Ajout de l'établissement dans la requête KPI récupérant les ([ada2a44](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/ada2a44c3ec9ba45462bd7e78984dfa38008e231))
|
||||||
* Ajout des niveaux scolaires dans le back [[#27](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/27)] ([05542df](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/05542dfc40649fd194ee551f0298f1535753f219))
|
* Ajout des niveaux scolaires dans le back [[#27](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/27)] ([05542df](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/05542dfc40649fd194ee551f0298f1535753f219))
|
||||||
* ajout des urls prod et demo ([b780e8b](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/b780e8b4ff4b5e6bbbccf1c77a56136c0c4affcb)), closes [#1](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/1) [#123](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/issues/123)
|
* ajout des urls prod et demo ([043d93d](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/043d93dcc476e5eb3962fdbe0f6a81b937122647))
|
||||||
* Ajout du % ou € en mode édition de réduction ([f2628bb](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/f2628bb45a14da42d014e42b1521820ffeedfb33))
|
* Ajout du % ou € en mode édition de réduction ([f2628bb](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/f2628bb45a14da42d014e42b1521820ffeedfb33))
|
||||||
* Ajout du controle sur le format des dates ([e538ac3](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/e538ac3d56294d4e647a38d730168ea567c76f04))
|
* Ajout du controle sur le format des dates ([e538ac3](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/e538ac3d56294d4e647a38d730168ea567c76f04))
|
||||||
* Ajout du mode Visu ([e1c6073](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/e1c607308c12cf75695e9d4593dc27ebe74e6a4f))
|
* Ajout du mode Visu ([e1c6073](https://git.v0id.ovh:5022/n3wt-innov/n3wt-school/commit/e1c607308c12cf75695e9d4593dc27ebe74e6a4f))
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "n3wt-school-front-end",
|
"name": "n3wt-school-front-end",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
22
conf/backend.env.default
Normal file
22
conf/backend.env.default
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
TZ="Europe/Paris"
|
||||||
|
TEST_MODE=true
|
||||||
|
CSRF_COOKIE_SECURE=true
|
||||||
|
CSRF_COOKIE_DOMAIN=".localhost"
|
||||||
|
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://localhost:8080,http://127.0.0.1:8080
|
||||||
|
CSRF_TRUSTED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://localhost:8080,http://127.0.0.1:8080
|
||||||
|
BASE_URL=http://localhost:3000
|
||||||
|
DEBUG=false
|
||||||
|
EMAIL_HOST="smtp.hostinger.com"
|
||||||
|
EMAIL_PORT="587"
|
||||||
|
EMAIL_HOST_USER=""
|
||||||
|
EMAIL_HOST_PASSWORD=''
|
||||||
|
EMAIL_USE_TLS=true
|
||||||
|
EMAIL_USE_SSL=false
|
||||||
|
DB_NAME="school"
|
||||||
|
DB_USER="postgres"
|
||||||
|
DB_PASSWORD="postgres"
|
||||||
|
DB_HOST="database"
|
||||||
|
DB_PORT="5432"
|
||||||
|
URL_DJANGO="http://localhost:8080"
|
||||||
|
SECRET_KEY="<SIGNINGKEY>"
|
||||||
@ -1,15 +1,19 @@
|
|||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: 'redis:latest'
|
image: "redis:latest"
|
||||||
|
volumes:
|
||||||
|
- redis-data:/data
|
||||||
expose:
|
expose:
|
||||||
- 6379
|
- 6379
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Paris
|
- TZ=Europe/Paris
|
||||||
|
|
||||||
database:
|
database:
|
||||||
image: 'postgres:latest'
|
image: "postgres:latest"
|
||||||
expose:
|
expose:
|
||||||
- 5432
|
- 5432
|
||||||
|
volumes:
|
||||||
|
- postgres-data:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
@ -20,17 +24,13 @@ services:
|
|||||||
image: git.v0id.ovh/n3wt-innov/n3wt-school/backend:latest
|
image: git.v0id.ovh/n3wt-innov/n3wt-school/backend:latest
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
environment:
|
env_file: "./conf/backend.env"
|
||||||
- TZ=Europe/Paris
|
|
||||||
- TEST_MODE=True
|
|
||||||
links:
|
links:
|
||||||
- "database:database"
|
- "database:database"
|
||||||
- "redis:redis"
|
- "redis:redis"
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- database
|
- database
|
||||||
volumes:
|
|
||||||
- ./conf/application.json:/Back-End/Subscriptions/Configuration/application.json
|
|
||||||
command: python start.py
|
command: python start.py
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
@ -40,6 +40,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Paris
|
- TZ=Europe/Paris
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- NEXT_PUBLIC_API_URL=http://toto:8080
|
volumes:
|
||||||
depends_on:
|
- ./conf/env:/app/.env
|
||||||
- backend
|
volumes:
|
||||||
|
postgres-data:
|
||||||
|
redis-data:
|
||||||
|
|||||||
@ -1,55 +1,24 @@
|
|||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: "redis:latest"
|
image: "redis:latest"
|
||||||
ports:
|
volumes:
|
||||||
- 6379:6379
|
- redis-data:/data
|
||||||
|
expose:
|
||||||
|
- 6379
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Paris
|
- TZ=Europe/Paris
|
||||||
|
|
||||||
database:
|
database:
|
||||||
image: "postgres:latest"
|
image: "postgres:latest"
|
||||||
ports:
|
expose:
|
||||||
- 5432:5432
|
- 5432
|
||||||
|
volumes:
|
||||||
|
- postgres-data:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
POSTGRES_DB: school
|
POSTGRES_DB: school
|
||||||
TZ: Europe/Paris
|
TZ: Europe/Paris
|
||||||
# docuseal_db:
|
|
||||||
# image: postgres:latest
|
|
||||||
# environment:
|
|
||||||
# POSTGRES_USER: postgres
|
|
||||||
# POSTGRES_PASSWORD: postgres
|
|
||||||
# DOCUSEAL_DB_HOST: docuseal_db
|
|
||||||
# POSTGRES_DB: docuseal
|
|
||||||
# ports:
|
|
||||||
# - 5433:5432 # port différent si besoin d'accès direct depuis l'hôte
|
|
||||||
|
|
||||||
# docuseal:
|
|
||||||
# image: docuseal/docuseal:latest
|
|
||||||
# container_name: docuseal_app
|
|
||||||
# depends_on:
|
|
||||||
# - docuseal_db
|
|
||||||
# ports:
|
|
||||||
# - "3001:3000"
|
|
||||||
# environment:
|
|
||||||
# DATABASE_URL: postgresql://postgres:postgres@docuseal_db:5432/docuseal
|
|
||||||
# volumes:
|
|
||||||
# - ./docuseal:/data/docuseal
|
|
||||||
|
|
||||||
# caddy:
|
|
||||||
# image: caddy:2
|
|
||||||
# container_name: caddy
|
|
||||||
# restart: unless-stopped
|
|
||||||
# ports:
|
|
||||||
# - "4000:4443"
|
|
||||||
# volumes:
|
|
||||||
# - ./Caddyfile:/etc/caddy/Caddyfile
|
|
||||||
# - caddy_data:/data
|
|
||||||
# - caddy_config:/config
|
|
||||||
# depends_on:
|
|
||||||
# - docuseal
|
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
build:
|
build:
|
||||||
@ -58,54 +27,15 @@ services:
|
|||||||
- 8080:8080
|
- 8080:8080
|
||||||
volumes:
|
volumes:
|
||||||
- ./Back-End:/Back-End
|
- ./Back-End:/Back-End
|
||||||
environment:
|
env_file: "./conf/backend.env"
|
||||||
- TZ=Europe/Paris
|
|
||||||
- TEST_MODE=True
|
|
||||||
- CORS_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://localhost:8080,http://127.0.0.1:8080
|
|
||||||
- CSRF_TRUSTED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://localhost:8080,http://127.0.0.1:8080
|
|
||||||
- BASE_URL=http://localhost:3000
|
|
||||||
links:
|
links:
|
||||||
- "database:database"
|
- "database:database"
|
||||||
- "redis:redis"
|
- "redis:redis"
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- database
|
- database
|
||||||
#- docuseal
|
|
||||||
command: python start.py
|
command: python start.py
|
||||||
|
|
||||||
# init_docuseal_users:
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: Dockerfile
|
|
||||||
# depends_on:
|
|
||||||
# - docuseal
|
|
||||||
# environment:
|
|
||||||
# DOCUSEAL_DB_HOST: docuseal_db
|
|
||||||
# POSTGRES_USER: postgres
|
|
||||||
# POSTGRES_PASSWORD: postgres
|
|
||||||
# USER_FIRST_NAME: n3wt
|
|
||||||
# USER_LAST_NAME: school
|
|
||||||
# USER_COMPANY: n3wt.innov
|
|
||||||
# USER_EMAIL: n3wt.school@gmail.com
|
|
||||||
# USER_PASSWORD: n3wt1234
|
|
||||||
# volumes:
|
|
||||||
# - ./initDocusealUsers.sh:/docker-entrypoint-initdb.d/initDocusealUsers.sh
|
|
||||||
|
|
||||||
# frontend:
|
|
||||||
# build:
|
|
||||||
# context: ./Front-End
|
|
||||||
# args:
|
|
||||||
# - BUILD_MODE=development
|
|
||||||
# ports:
|
|
||||||
# - 3000:3000
|
|
||||||
# volumes:
|
|
||||||
# - ./Front-End:/app
|
|
||||||
# env_file:
|
|
||||||
# - .env
|
|
||||||
# environment:
|
|
||||||
# - TZ=Europe/Paris
|
|
||||||
# depends_on:
|
|
||||||
# - backend
|
|
||||||
volumes:
|
volumes:
|
||||||
caddy_data:
|
postgres-data:
|
||||||
caddy_config:
|
redis-data:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "n3wt-school",
|
"name": "n3wt-school",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
"release": "standard-version",
|
"release": "standard-version",
|
||||||
|
|||||||
Reference in New Issue
Block a user