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
|
||||
|
||||
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"]
|
||||
|
||||
|
|
|
@ -3,15 +3,8 @@ services:
|
|||
website:
|
||||
build: .
|
||||
volumes:
|
||||
- code:/code
|
||||
- ./code:/code
|
||||
|
||||
networks:
|
||||
- main
|
||||
|
||||
networks:
|
||||
main:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
code:
|
||||
ports:
|
||||
- "1313:1313"
|
||||
|
||||
|
|
Loading…
Reference in a new issue