From f1e2ef7af1fa739c752dcf4bf31de7c2313d2351 Mon Sep 17 00:00:00 2001 From: Jonas Schwartz Date: Tue, 7 Aug 2018 23:36:57 +0200 Subject: [PATCH] WIP - Comments and Cloud 2 --- 3.0/mkdocs.yml | 2 ++ Dockerfile | 15 +++++++++++++++ requirements.txt | 25 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 Dockerfile create mode 100644 requirements.txt diff --git a/3.0/mkdocs.yml b/3.0/mkdocs.yml index 10b45b34..39aacbad 100644 --- a/3.0/mkdocs.yml +++ b/3.0/mkdocs.yml @@ -1,5 +1,6 @@ site_name: 'Vapor Docs' copyright: 'Copyright © 2018 Qutheory, LLC' +site_url: 'https://vapor-docs.v2.vapor.cloud/3.0/' pages: - 'Overview': 'index.md' @@ -135,6 +136,7 @@ extra: font: text: 'Roboto Slab' code: 'Source Code Pro' + disqus: 'staging-vapor-docs' google_analytics: - 'UA-76177358-4' diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..15b54a15 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:alpine as build-stage + +# Set up workspace and install mkdocs and dependencies. +COPY . /app +WORKDIR /app +RUN pip install -r requirements.txt && rm -rf $HOME/.cache/pip + +RUN cd 3.0 && mkdocs build + +FROM nginx:1.13.12-alpine as production-stage +COPY --from=build-stage /app/3.0/site/ /usr/share/nginx/html/3.0 +RUN echo "" > /usr/share/nginx/html/index.html; +RUN chown -R nginx:nginx /usr/share/nginx/html/ +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..8a545163 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,25 @@ +# Copyright (c) 2016-2018 Martin Donath + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +# Direct dependencies +mkdocs>=1 +mkdocs-material>=3 +Pygments>=2.2 +pymdown-extensions>=4.11