working auto-update

This commit is contained in:
penwing-bathhouse 2024-09-25 09:05:48 +02:00
parent 6e6d5a540d
commit 9e690b9069
9 changed files with 27 additions and 6 deletions

View file

@ -2,8 +2,13 @@ FROM ghcr.io/getzola/zola:v0.17.1 as zola
COPY . /project COPY . /project
WORKDIR /project WORKDIR /project
RUN ["zola", "build"]
FROM ghcr.io/static-web-server/static-web-server:2 ENV PATH="/usr/local/bin:${PATH}"
WORKDIR /
COPY --from=zola /project/public /public CMD ["serve", "--interface", "0.0.0.0", "--port", "80", "--base-url", "codicam.penwing.org"]
#RUN ["zola", "build"]
#FROM ghcr.io/static-web-server/static-web-server:2
#WORKDIR /
#COPY --from=zola /project/public /public

Binary file not shown.

View file

@ -8,6 +8,8 @@ on fait plein de trucs vachements cools
# Projets # Projets
avec des gens super géniaux
## Truc cool ## Truc cool
[lien](@/codicam/truccool.md) [lien](@/codicam/truccool.md)

View file

@ -8,6 +8,8 @@ on fait plein de trucs vachements cools
# Projets # Projets
Big up au général Kenobiiiiiii
## Truc cool ## Truc cool
[lien](@/roboticam/truccool.md) [lien](@/roboticam/truccool.md)

View file

@ -5,6 +5,11 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
ports: ports:
- "8001:80" - "8001:80"
volumes:
- ./content:/project/content
- ./templates:/project/templates
- ./static:/project/static
- ./sass:/project/sass
restart: unless-stopped restart: unless-stopped
edit-codicam: edit-codicam:

View file

@ -3,8 +3,8 @@
<title>{{ config.title }}</title> <title>{{ config.title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Icam assoss"> <meta name="description" content="Icam assoss">
<link rel="stylesheet" href="{{ get_url(path="style.css") | safe }}"> <link rel="stylesheet" href="https://codicam.penwing.org/style.css">
<link rel="icon" href="{{ get_url(path="icon.png") | safe }}" type="image/png"> <link rel="icon" href="https://codicam.penwing.org/icon.png" type="image/png">
</head> </head>
<body> <body>
<div class="sidenav"> <div class="sidenav">

7
update.sh Normal file
View file

@ -0,0 +1,7 @@
#!/bin/sh
while true; do
inotifywait -r -e modify,create,delete ./content
zola build
echo "Changes detected. Rebuilding site..."
done