From 95fc599d9d6b99805fdc972ca47433d909b19dd2 Mon Sep 17 00:00:00 2001 From: vanten-s Date: Sun, 21 Jul 2024 20:14:18 +0200 Subject: [PATCH] Fixed Hugo server --- .gitignore | 1 + Dockerfile | 13 ++++--------- docker-compose.yml | 13 +++---------- 3 files changed, 8 insertions(+), 19 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ce4701d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +code/ diff --git a/Dockerfile b/Dockerfile index 1584819..2a97cdf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,21 @@ # syntax=docker/dockerfile:1 -FROM python:3.11-alpine +FROM alpine:latest # Set working dir WORKDIR /code # Download git RUN apk add git +RUN apk add hugo # Download files RUN git clone https://forgejo.vanten-s.com/vanten-s/vanten-s.com . RUN git submodule update --init -# Get latest feeds -RUN git -C feed_articles pull origin main - -# Install requirements -RUN pip3 install -r requirements.txt - # Allow us to access the server -EXPOSE 3000 +EXPOSE 1313 # Run -CMD ["python3", "main.py", "&"] +CMD ["hugo", "server"] diff --git a/docker-compose.yml b/docker-compose.yml index 3585ffb..09df206 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,15 +3,8 @@ services: website: build: . volumes: - - code:/code + - ./code:/code - networks: - - main - -networks: - main: - driver: bridge - -volumes: - code: + ports: + - "1313:1313"