| allauth_oauth | ||
| docs | ||
| photo21 | ||
| photologue | ||
| Scripts | ||
| .env.example | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| Cold_Backup.md | ||
| COPYING | ||
| maintenance_tool.sh | ||
| manage.py | ||
| README.md | ||
| requirements.txt | ||
| tox.ini | ||
Photo server 2021-2023
This project is a fork of Photo21 developped at ENS Paris-Saclay.
This is the source code for the webserver hosting pictures from the ENS Paris-Saclay student life.
The philosophy of this project is to keep this code as simple as possible to run and to maintain.
Setup
-
Dependency installation. If you are not using Debian, please feel free to adapt the following instructions.
sudo apt install git gettext python3-django python3-django-allauth python3-django-crispy-forms python3-docutils python3-exifread python3-pil -
Cloning. Change directory to where you want the project to be. In production, we usually use
/var/www/photos/as therootuser.git clone https://codeberg.org/krek0/photo21.git && cd photo21 -
Configuration (production only).
sudo mkdir static media sudo chmod +x maintenance_tool.sh -
Database (production only). In development, you may use SQLite (no setup). In production, we use PostgreSQL which require a bit of setup:
sudo apt install postgresql postgresql-contrib sudo -u postgres psql postgres=# CREATE USER photo21 WITH PASSWORD 'un_mot_de_passe_sur'; postgres=# CREATE DATABASE photo21 OWNER photo21; -
Initialization., In production, please use
www-datauser../manage.py collectstatic ./manage.py check ./manage.py migrate ./manage.py compilemessages # Only when creating a new database ./manage.py loaddata initial ./manage.py createsuperuser # change DEBUG to True in photo21/settings.py -
Maintenance Mode., In production to toggle the server mainteance mode
./maintenance_tool.sh -
Enjoy \o/
In development, you can launch the development server using:
(env)$ ./manage.py runserver