Skip to content

Instantly share code, notes, and snippets.

View SamuelChojnacki's full-sized avatar
🏠
Working from home

Samuel Chojnacki SamuelChojnacki

🏠
Working from home
View GitHub Profile
@SamuelChojnacki
SamuelChojnacki / gist:9020fab53fa4acb11cb281507204d1a9
Last active March 23, 2025 14:32
generate react component from json
// render-json.tsx
import React from "react";
/**
* Interface pour un élément dans la structure JSON
*/
interface ElementJson {
/** Type d'élément HTML (div, p, span, etc.) */
type: string;
/** Attributs HTML et propriétés de l'élément */
@SamuelChojnacki
SamuelChojnacki / gist:097a7dd0d4724c24062d8fb1063dfeae
Last active February 7, 2025 11:46
Strapi v5 Docker compose with postgresql
## production :
services:
api:
container_name: api
platform: linux/amd64
build:
context: .
dockerfile: ./Dockerfile.prod.yml
image: api:latest
## Production :
# Étape 1 : Construction
FROM node:20.11.1-alpine3.19 AS builder
# Définir le répertoire de travail
WORKDIR /opt/app
# Copier les fichiers nécessaires pour installer les dépendances
COPY package.json yarn.lock ./