Fixed Hugo server
This commit is contained in:
parent
5b78a7a91c
commit
95fc599d9d
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
code/
|
13
Dockerfile
13
Dockerfile
|
@ -1,26 +1,21 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM python:3.11-alpine
|
FROM alpine:latest
|
||||||
|
|
||||||
# Set working dir
|
# Set working dir
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
|
|
||||||
# Download git
|
# Download git
|
||||||
RUN apk add git
|
RUN apk add git
|
||||||
|
RUN apk add hugo
|
||||||
|
|
||||||
# Download files
|
# Download files
|
||||||
RUN git clone https://forgejo.vanten-s.com/vanten-s/vanten-s.com .
|
RUN git clone https://forgejo.vanten-s.com/vanten-s/vanten-s.com .
|
||||||
RUN git submodule update --init
|
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
|
# Allow us to access the server
|
||||||
EXPOSE 3000
|
EXPOSE 1313
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
CMD ["python3", "main.py", "&"]
|
CMD ["hugo", "server"]
|
||||||
|
|
||||||
|
|
|
@ -3,15 +3,8 @@ services:
|
||||||
website:
|
website:
|
||||||
build: .
|
build: .
|
||||||
volumes:
|
volumes:
|
||||||
- code:/code
|
- ./code:/code
|
||||||
|
|
||||||
networks:
|
ports:
|
||||||
- main
|
- "1313:1313"
|
||||||
|
|
||||||
networks:
|
|
||||||
main:
|
|
||||||
driver: bridge
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
code:
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue