Skip to content

Commit

Permalink
Create a basic docker image
Browse files Browse the repository at this point in the history
In order to revise the way the website is built and  hosted, a basic
Docker image has been added to handle the whole process of
generating all feeds and building the website.
  • Loading branch information
Themimitoof committed May 23, 2023
1 parent fcc3ee3 commit c5f238d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.ruff_cache
.vscode
.hugo_build.lock
site/public/
site/data/
feed/
.venv/
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:3.11-alpine

RUN apk add hugo && pip install poetry

COPY . /app
WORKDIR /app

RUN poetry install && chmod 655 build-website.sh

CMD sh /app/build-website.sh
12 changes: 12 additions & 0 deletions build-website.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/env sh

echo "Generate all feeds"
poetry run python generate_feed.py

sh bin/prepare-hugo-build.sh

echo "Building Hugo website"
cd site
hugo

echo "Done!"

0 comments on commit c5f238d

Please sign in to comment.