Skip to content

Commit

Permalink
Add Dockerfile and vercel.json to deploy on Vercel (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
klaasnicolaas authored Jul 24, 2024
1 parent 4527bc2 commit 3de9490
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Gebruik een officiële Python runtime als basisimage
FROM python:3.12-slim

# Stel de werkdirectory in
WORKDIR /app

# Installeer curl en andere noodzakelijke pakketten
RUN apt-get update && apt-get install -y curl git

# Installeer Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -

# Voeg Poetry toe aan de PATH
ENV PATH="/root/.local/bin:$PATH"

# Kopieer de projectbestanden naar de werkdirectory
COPY . .

# Installeer de dependencies met Poetry
RUN poetry install

# Build de MkDocs site
RUN poetry run mkdocs build

# Geef de build directory op als Vercel output
CMD ["cp", "-r", "site", "/vercel/output"]
15 changes: 15 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": 2,
"builds": [
{
"src": "Dockerfile",
"use": "@vercel/docker"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "/site/$1"
}
]
}

0 comments on commit 3de9490

Please sign in to comment.