Add Makefile, package.json, and initial configuration for VitePress and Slidev integration
- Introduced a Makefile for streamlined commands related to building, running, and managing presentations. - Created package.json to define project metadata, dependencies, and scripts for development and testing. - Added .gitignore entries to exclude build artifacts and temporary files from version control. - Included playwright.config.mjs for end-to-end testing setup with Playwright. - Added README.md for project documentation, outlining setup instructions and development guidelines.
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
# Contexte minimal : seuls Dockerfile, nginx/ et refresh.sh sont nécessaires.
|
||||
# Le dépôt applicatif est cloné dans l'image (voir Dockerfile).
|
||||
@@ -1,39 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# Même logique que l’image upstream : UID/GID numériques, pas le nom « nginx ».
|
||||
# https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/stable/alpine/Dockerfile
|
||||
FROM nginxinc/nginx-unprivileged:stable-alpine
|
||||
|
||||
ARG UID=101
|
||||
ARG GID=101
|
||||
|
||||
USER root
|
||||
RUN --mount=type=cache,target=/var/cache/apk \
|
||||
apk add --no-cache git
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
ARG TALKS_REPO_URL=https://git.specificat.io/arnault/Talks.git
|
||||
ARG TALKS_BRANCH=main
|
||||
ARG TALKS_SPARSE_DIR=content
|
||||
|
||||
RUN find . -mindepth 1 -delete \
|
||||
&& git clone --filter=blob:none --sparse --branch "${TALKS_BRANCH}" --single-branch "${TALKS_REPO_URL}" . \
|
||||
&& git sparse-checkout init --cone \
|
||||
&& git sparse-checkout set "${TALKS_SPARSE_DIR}"
|
||||
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY refresh.sh /refresh.sh
|
||||
|
||||
# Pas de « su 101 » : git config en root puis chown. HOME=/tmp : pas de /home artificiel dans une image stateless.
|
||||
RUN chmod +x /refresh.sh \
|
||||
&& chown -R "${UID}:${GID}" /usr/share/nginx/html /refresh.sh \
|
||||
&& HOME=/tmp git config --global --add safe.directory /usr/share/nginx/html \
|
||||
&& chown "${UID}:${GID}" /tmp/.gitconfig
|
||||
|
||||
ENV HOME=/tmp
|
||||
|
||||
USER ${UID}
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD sh -c "/refresh.sh & exec nginx -g 'daemon off;'"
|
||||
@@ -1,12 +0,0 @@
|
||||
server {
|
||||
listen 8080;
|
||||
server_name localhost;
|
||||
# Racine web = contenu statique sparse (dossier content/ du dépôt).
|
||||
root /usr/share/nginx/html/content;
|
||||
index index.html index.htm;
|
||||
|
||||
location / {
|
||||
add_header Cache-Control "no-cache";
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Répertoire git : /usr/share/nginx/html (sparse checkout limité à content/).
|
||||
cd /usr/share/nginx/html || exit 1
|
||||
|
||||
while true; do
|
||||
echo "Pulling latest changes from origin/main (sparse content/)..."
|
||||
git pull origin main || echo "git pull failed, will retry in 300s"
|
||||
sleep 300
|
||||
done
|
||||
Reference in New Issue
Block a user