diff --git a/.gitignore b/.gitignore index 236d556437d90c43b6ca5cccb3494c8722210304..c174b07e3c51822abe73422a1cb2313828162cf3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ ## Generated site/ +tmp/ node_modules/ *.bkp swagger/**/docs/*.md diff --git a/Dockerfile b/Dockerfile index d9af75c47005df71e3ef16978e1cf65777d97074..b65cae1bf2e8a59dfcf3e16411bdb988a77e771d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,32 +1,3 @@ -FROM debian:stable as build +FROM nginx:latest -ENV PYTHONUNBUFFERED=1 - -RUN apt-get update && apt-get install -y python3 python3-pip git - -COPY requirements.txt ./requirements.txt -RUN pip3 install -r ./requirements.txt - -COPY ./docs/images ./docs/images -COPY ./docs/operation ./docs/operation -COPY ./docs/stylesheets ./docs/stylesheets -COPY ./docs/videos ./docs/videos -COPY ./docs/contact.md ./docs/contact.md -COPY ./docs/getting-started.md ./docs/getting-started.md -COPY ./docs/index.md ./docs/index.md -COPY ./docs/publications.md ./docs/publications.md -COPY ./docs/system.md ./docs/system.md -COPY ./mkdocs.yml ./mkdocs.yml - -RUN git clone git@gitlab.phaidra.org:fair-data-austria-db-repository/fda-docs.git - -WORKDIR ./fda-docs - -# 1.2 -RUN mike deploy 1.2 - -# 1.1 -RUN git checkout beec500012949c1baa197c72d52e383276a8fd02 -RUN mike deploy 1.1 - -ENTRYPOINT [ "mkdocs", "build" ] \ No newline at end of file +COPY ./site /usr/share/nginx/html \ No newline at end of file diff --git a/Makefile b/Makefile index 468c991692eb1ccd42b2a1c2547ff1f65f2409f6..9af9c78c79c4aa285d086de678cb7da074f86727 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,8 @@ all: build clean: rm -rf ./site + docker container stop docs-server || true + docker container rm docs-server || true release-deps: pip3 install -r ./dockerhub/requirements.txt @@ -15,10 +17,7 @@ release: release-deps build: docker compose build - docker compose up -version: - mike list - -install: build version - sudo cp -r ./site/* /usr/share/nginx/html/ \ No newline at end of file +install: build + sudo certbot certonly --standalone --preferred-challenges http -d dbrepo-docs.ossdip.at --agree-tos --keep-until-expiring + docker compose up -d \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 355ad347339a3cceeea3c02294164e276700c166..d7d3171f09e8fe76618ba680fecd54e5692377a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,23 +1,12 @@ version: "3.6" -networks: - fda-public: - name: fda-public - driver: bridge - ipam: - config: - - subnet: 172.29.0.0/16 - services: - fda-docs-builder: + docs-server: build: . - image: fda-docs-builder + container_name: dbrepo-docs-server + hostname: dbrepo-docs-server volumes: - - ./site:/site - networks: - - fda-public - environment: - TZ: Europe/Vienna - logging: - driver: json-file + - /etc/letsencrypt/live/:/tmp:ro + ports: + - 80:80 \ No newline at end of file