Added website
This commit is contained in:
parent
6db03085d1
commit
b1b374ac19
14
website/Dockerfile
Normal file
14
website/Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
|||
FROM python:latest
|
||||
WORKDIR /usr/local/app
|
||||
|
||||
# Install the application dependencies
|
||||
RUN pip install --no-cache-dir pelican icalendar markdown
|
||||
|
||||
VOLUME ["/usr/local/app/source"]
|
||||
VOLUME ["/usr/local/app/output"]
|
||||
|
||||
# Execute the execute.sh file
|
||||
COPY execute.sh /usr/local/app/execute.sh
|
||||
RUN chmod +x /usr/local/app/execute.sh
|
||||
|
||||
CMD ["/usr/local/app/execute.sh"]
|
6
website/Makefile
Normal file
6
website/Makefile
Normal file
|
@ -0,0 +1,6 @@
|
|||
DOCKER ?= docker
|
||||
IMAGE ?= website
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
$(DOCKER) build -t $(IMAGE) .
|
7
website/execute.sh
Executable file
7
website/execute.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Pull the website from git
|
||||
cd source && git pull
|
||||
|
||||
# Compile the markdown to HTML in a volume
|
||||
make html OUTPUTDIR=/usr/local/app/output
|
12
website/run.sh
Executable file
12
website/run.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker run --rm \
|
||||
--name website \
|
||||
--network unitservices \
|
||||
--volume /var/unit/website/source:/usr/local/app/source \
|
||||
--volume /opt/nginx/unit.abbiamoundominio.org:/usr/local/app/output \
|
||||
--add-host git.abbiamoundominio.org:192.168.122.2 \
|
||||
website
|
||||
|
||||
# XXX: the --add-host was added because the container could not resolve the domain of the gitserver
|
||||
# TODO: what do we change 192.168.122.2 to, when Amelia is gone?
|
Loading…
Reference in New Issue
Block a user