ristekoss/susunjadwal-backend
À propos
SusunJadwal : l’application de planification des cours n° 1 des étudiants de l’Université d’Indonésie.
Apprentissage et éducationProgression mesurée des étoiles
- in 24h
- -1
- in 7 days
- -1
- in 15 days
- -2
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalSusun Jadwal
Susun Jadwal is an open source tool to plan class schedules for university students, developed by Ristek Fasilkom UI. https://susunjadwal.cs.ui.ac.id/
In the spirit of Open Source Software, everyone is welcome to contribute to Susun Jadwal! See the Contributing Guide below for more.
Structure
app/ // general views
models/ // mongoDB models
scraper/ // courses (academic.ui.ac.id) scraper
sso/ // SSO UI authentication logic
requirements.txt // python dependency list
scripts/ // (utility scripts)
├── init-mongo.sh // script to create non-root mongoDB user
├── launch.sh // main script to start flask
├── mongo_dump.sh // script to dump mongoDB data to .dump file
└── start.sh // alternative script to start flask
.env.example // template for .env file
dev.docker-compose.yml // docker-compose for mongo and rmq
docker-compose.yml // docker-compose for mongo, rmq, & server
Contributing Guide
Everyone is welcome to contribute to Susun Jadwal! Feel free to make a contribution by submitting a pull request. You can also report bugs and request features / changes by creating a new Issue.
For in-depth discussion, please join RistekOSS's Discord.
Development
Requirements
python(tested on 3.6 and 3.9.18), andpipdocker
Installing
The following steps will assume you have already set up a python virtual environment,
and will use dev.docker-compose.yml.
Boot up MongoDB and RabbitMQ:
docker-compose -f dev.docker-compose.yaml upPopulate
.env, using.env.exampleas reference.Connect to MongoDB and create a non-root user.
mongosh -u <root-username> // enter password when prompted use <db_name>; db.createUser({user: "<MONGODB_USERNAME>", pwd: "<MONGODB_PASSWORD>", roles: ["readWrite"]}); // response should be '{ok: 1}', use these credentials in your .env secretsBoot up the Flask server:
export PORT=8000 && bash scripts/launch.shPing the API:
http://localhost:8000/susunjadwal/api/
Containerizing the Server
For Local
Populate
.env.Run
docker-compose.yml.
For Deployment
While RISTEK uses a different standardized workflow, here is a general guide on deploying.
Populate
.env.Replace line 23-25 in
docker-compose.ymlto pull from Docker Hub:
image: ristekoss/susunjadwal-backend:stable
Modify the credentials in
MONGO_INITDB_XXenvironment variables.docker compose up
Dump and Restore Database
Dump
- Run the dump script:
bash mongo_dump.sh - The result will be a
.dumpfile in the directory./mongodump.
Restore
- Copy dump file to MongoDB Container:
docker cp <path_to_dump_file> susunjadwalbackend_mongo_1:/<path_to_dump_file> - Load dump into DB:
docker exec -it <mongo_container_name> mongorestore -u <root_username> --archive=<file.dump> - Enter
<root_username>'s password when prompted. - You should see the success message:
XX documents successfully restored.
Deployment
We use a standardized pipeline for all our products which we invoke from .github/workflows/deploy-<env>.yaml
Legacy Version
To see the version of susunjadwal-backend which was maintained and deployed up until 2023, see 5b8f710.
License
See LICENSE.md. This software actually goes a long way back, thank you so much to everyone involved.
Explorer des projets similaires
Chargement…