Logiciel basé sur django pour gérer un agenda culturel local participatif.
Go to file
2023-11-10 00:21:11 +01:00
deployment Première intégration d'un événement FB 2023-10-18 19:53:26 +02:00
experimentations Ajout d'un script qui arrive à récupérer les infos d'un événement depuis son URL facebook (et c'était chaud) 2023-10-15 16:22:52 +02:00
scripts add media files to production compose 2023-05-10 13:19:19 +02:00
src on affiche le status des événements aux utilisateurs connectés 2023-11-10 00:21:11 +01:00
.dockerignore update 2023-05-10 12:09:50 +02:00
.gitignore remove labels from service 2023-05-10 17:41:05 +02:00
docker-compose.prod.yml fix: settings && update readme 2023-05-15 15:00:20 +02:00
docker-compose.yml Première intégration d'un événement FB 2023-10-18 19:53:26 +02:00
env.example fix: settings && update readme 2023-05-15 15:00:20 +02:00
LICENSE Create LICENSE 2023-05-12 10:20:23 +02:00
Makefile Intégration de beautifulsoup et selenium pour récupérer le contenu d'un événement Facebook 2023-10-18 11:53:07 +02:00
pyproject.toml Configuration du build dev pour le projet agenda_culturel 2023-09-16 15:15:05 +02:00
README.md mise à jour du readme 2023-09-17 11:19:14 +02:00

Agenda culturel

L'agenda culturel est un projet django créé à partir de Django Docker Quickstard pour faciliter son développemnt et déploiement. Voir ci-dessous le readme issu de ce projet.

Django Docker Quickstart

This quickstart provides an easy way to initiate a Django project using Docker. It comes with pre-configured services including PostgreSQL, Redis, Celery (worker and beat), Nginx, and Traefik, ready to run a Django web application. Additionally, it provides a few handy shortcuts for easier development.


Features 🚀

  • Django web application framework
  • PostgreSQL database
  • Redis in-memory data structure store
  • Celery worker and beat services for running background tasks asynchronously
  • Nginx web server for serving static and media files, and proxying requests to the Django application
  • Traefik reverse proxy for routing requests to the appropriate service and providing SSL termination

Included Packages and Tools 🛠️

  • Pytest: Testing framework
  • Pytest Sugar: A pytest plugin for a better look
  • Pytest Django: A pytest plugin providing useful tools for testing Django applications
  • Coverage: Test coverage tool
  • Ruff: Linter
  • Black: Code formatter

Requirements 📋


Getting Started 🏁

  1. Clone the repository:

    git clone https://github.com/jmtrivial/agenda-culturel.git
    
  2. Change directory into the project:

    cd agenda-culturel
    
  3. Copy the env.example file to .env and update the values as needed:

    • For Linux/macOS:
      cp env.example .env
      
    • For Windows (Command Prompt):
       Copy-Item -Path env.example -Destination .env
      

Initial Setup ⚙️

Development Prerequisites

  1. Create a virtual environment:

    python -m venv venv
    
  2. Activate the virtual environment:

    source venv/bin/activate
    
  3. (Optional) Install the development requirements specific to your IDE for enhanced functionality and support.

    pip install -r src/requirements-dev.txt
    
  4. Build the image and run the container:

    • If buildkit is not enabled, enable it and build the image:

      DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.yml up --build -d
      
    • If buildkit is enabled, build the image:

      docker-compose -f docker-compose.yml up --build -d
      
    • Or, use the shortcut:

      make build-dev
      

You can now access the application at http://localhost:8008. The development environment allows for immediate reflection of code changes.

Production Setup

  1. Build the image and run the container:

    • If buildkit is not enabled, enable it and build the image:

        DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.prod.yml up --build -d
      
    • If buildkit is enabled, build the image:

       docker-compose -f docker-compose.prod.yml up --build -d
      
    • Or, use the shortcut:

        make build-prod
      

Shortcuts 🔑

This project includes several shortcuts to streamline the development process:

  • Create migrations:

    make make-migrations
    
  • Run migrations:

    make migrate
    
  • Run the linter:

    make lint
    
  • Run the formatter:

    make format
    
  • Run the tests:

    make test
    
  • Create a super user:

    make super-user
    
  • Build and run dev environment:

    make build-dev
    
  • Build and run prod environment:

    make build-prod