Fixed Hugo server

This commit is contained in:
vanten-s 2024-07-21 20:14:18 +02:00
parent 5b78a7a91c
commit 95fc599d9d
Signed by: vanten-s
GPG key ID: DE3060396884D3F2
3 changed files with 8 additions and 19 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
code/

View file

@ -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"]

View file

@ -3,15 +3,8 @@ services:
website:
build: .
volumes:
- code:/code
- ./code:/code
networks:
- main
networks:
main:
driver: bridge
volumes:
code:
ports:
- "1313:1313"