No description
Find a file
krek0 f38b947390
Some checks failed
Docker / build (push) Failing after 1m11s
Add Docker support with Dockerfile and entrypoint
2026-05-03 11:17:53 +02:00
.forgejo/workflows Add Docker support with Dockerfile and entrypoint 2026-05-03 11:17:53 +02:00
allauth_oauth Add Docker support with Dockerfile and entrypoint 2026-05-03 11:17:53 +02:00
docs add metrics 2025-11-30 13:51:18 +01:00
photo21 Add Docker support with Dockerfile and entrypoint 2026-05-03 11:17:53 +02:00
photologue Fix thumbnail bar render 2026-04-25 12:12:30 +02:00
Scripts Caches é SQL optimisations 2025-11-23 14:43:49 +01:00
.env.example Add Docker support with Dockerfile and entrypoint 2026-05-03 11:17:53 +02:00
.gitignore Add nex requirements and gitignore 2025-11-23 16:38:47 +01:00
.gitlab-ci.yml Fix pipiline errors 2025-11-23 16:54:25 +01:00
Cold_Backup.md Add Cold Backup 2026-01-27 10:52:58 +01:00
COPYING Add COPYING 2021-09-22 21:33:46 +02:00
Dockerfile Add Docker support with Dockerfile and entrypoint 2026-05-03 11:17:53 +02:00
entrypoint.sh Add Docker support with Dockerfile and entrypoint 2026-05-03 11:17:53 +02:00
maintenance_tool.sh Nginx debug and mantenance mode working 2025-11-27 10:07:35 +01:00
manage.py Unifomize license headers 2022-03-11 17:16:11 +01:00
README.md Remove Nginx-specific static and media serving, and serve media through Django using WhiteNoise and FileResponse. 2026-04-25 08:31:56 +02:00
requirements.txt Add Docker support with Dockerfile and entrypoint 2026-05-03 11:17:53 +02:00
tox.ini Make database, oauth, smtp server, mail verificaiton configurable in .env 2026-05-02 14:18:02 +02:00

Photo server 2021-2023

This project is a fork of Photo21 developped at ENS Paris-Saclay.

License: GPL v3

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

  1. 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
    
  2. Cloning. Change directory to where you want the project to be. In production, we usually use /var/www/photos/ as the root user.

    git clone https://codeberg.org/krek0/photo21.git && cd photo21
    
  3. Configuration (production only).

    sudo mkdir static media
    sudo chmod +x maintenance_tool.sh
    
  4. 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;
    
  5. Initialization., In production, please use www-data user.

    ./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
    
  6. Maintenance Mode., In production to toggle the server mainteance mode

    ./maintenance_tool.sh

  7. Enjoy \o/

    In development, you can launch the development server using:

    (env)$ ./manage.py runserver