Skip to content

baptiste-may/GRHB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRHB - Groupe de Recherches Historiques de Busnes

The official website for the Groupe de Recherches Historiques de Busnes (GRHB), built with Nuxt 4, Prisma, and Tailwind CSS.

🚀 Tech Stack

🛠 Installation

Prerequisites

  • Bun installed on your machine.
  • A PostgreSQL instance (or use the provided Docker setup).

Configuration

  1. Clone the repository:

    git clone <repository-url>
    cd grhb
  2. Install dependencies:

    bun install
  3. Configure environment variables: Copy .env.example to .env and fill in the values:

    cp .env.example .env

    Important for deployment:

    • DOMAIN_NAME: Your website domain (e.g., grhb-busnes.fr)
    • TRAEFIK_ACME_EMAIL: Email for Let's Encrypt SSL certificates.
    • POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB: Credentials for the internal database.
  4. Initialize the database (local development):

    bun x prisma migrate dev

💻 Development

Start the development server:

bun run dev

The application will be available at http://localhost:3000.

Access the admin interface at /admin (requires login via OVHcloud IAM).

Useful Scripts

  • Linting: bun run lint (ESLint + Typecheck)
  • Fix linting: bun run lint:fix
  • Image Cleanup: bun run cleanup (removes unused images in /public/uploads)
  • Prisma Studio: bun x prisma studio (GUI to explore the database)

🐳 Deployment (Docker & Traefik)

The project is designed to be self-hosted using Docker Compose and Traefik for automatic HTTPS management.

Production Start

  1. Ensure your .env file is correctly filled with production values.
  2. Launch the stack:
    docker compose pull
    docker compose up -d

To update the application to the latest version, simply run:

docker compose pull app
docker compose up -d app

This will start:

  • Nuxt App: The website (built with Bun, running with automatic Prisma migrations).
  • PostgreSQL: Database with persistent storage.
  • Traefik: Reverse proxy with automated Let's Encrypt SSL and dashboard.

Dashboard Traefik

The dashboard is available at https://dashboard.<DOMAIN_NAME>.

Persistence

The following data is persisted via Docker volumes:

  • db_data: All database records.
  • uploads: All images uploaded via the admin interface (mapped to /app/public/uploads).
  • traefik_certs: SSL certificates.

🧪 Testing

Unit & Component Tests (Vitest)

bun run test

E2E Tests (Playwright)

bun run test:e2e

📄 License

This project is private. All rights reserved.

About

Website for the GRHB

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages