From 1c4bc090fc737662740260a6ad88709b87d1b83c Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 21 Apr 2020 12:38:15 +0200 Subject: Improve webpull --- docker/webpull/Dockerfile.nodejs | 9 +++++++++ docker/webpull/Dockerfile.pug | 10 ---------- docker/webpull/Dockerfile.ruby | 12 ++++++++++++ docker/webpull/README.md | 17 +++++++++++++++-- 4 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 docker/webpull/Dockerfile.nodejs delete mode 100644 docker/webpull/Dockerfile.pug create mode 100644 docker/webpull/Dockerfile.ruby (limited to 'docker') diff --git a/docker/webpull/Dockerfile.nodejs b/docker/webpull/Dockerfile.nodejs new file mode 100644 index 0000000..acc7e74 --- /dev/null +++ b/docker/webpull/Dockerfile.nodejs @@ -0,0 +1,9 @@ +FROM node:13.8-buster + +RUN apt-get update && \ + apt-get install -y git + +COPY ./main /srv/httpd +WORKDIR /srv +CMD ["/srv/httpd"] + diff --git a/docker/webpull/Dockerfile.pug b/docker/webpull/Dockerfile.pug deleted file mode 100644 index 9600f35..0000000 --- a/docker/webpull/Dockerfile.pug +++ /dev/null @@ -1,10 +0,0 @@ -FROM node:13.8-buster - -RUN apt-get update && \ - apt-get install -y git && \ - npm install -g pug-cli jstransformer-markdown-it - -COPY ./main /srv/httpd -WORKDIR /srv -CMD ["/srv/httpd"] - diff --git a/docker/webpull/Dockerfile.ruby b/docker/webpull/Dockerfile.ruby new file mode 100644 index 0000000..7578cca --- /dev/null +++ b/docker/webpull/Dockerfile.ruby @@ -0,0 +1,12 @@ +FROM fedora:32 + +ENV LC_ALL=C.UTF-8 +ENV LANG=C.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV RUBYOPT --disable-did_you_mean + +RUN dnf install -y git ruby ruby-devel rubygems rubygem-bundler @development-tools redhat-rpm-config gcc-c++ zlib-devel + +COPY ./main /srv/httpd +WORKDIR /srv +CMD ["/srv/httpd"] diff --git a/docker/webpull/README.md b/docker/webpull/README.md index 351d300..5d17d17 100644 --- a/docker/webpull/README.md +++ b/docker/webpull/README.md @@ -2,9 +2,22 @@ Webpull allows you to update your live website without deploying a new docker container but by simply calling an URL -## Pug version +You need to specify a secret token at boot: + +``` +WEBPULL_TOKEN=s3cr3et ./webpull +``` + +## Node.js version + +``` +go build ./main.go +sudo docker build -f ./Dockerfile.nodejs -t superboum/amd64_webpull_pug:v1 . +``` + +## Ruby version ``` go build ./main.go -sudo docker build -f ./Dockerfile.pug -t superboum/amd64_webpull_pug:v1 +sudo docker build -f ./Dockerfile.ruby -t superboum/amd64_webpull_ruby:v1 . ``` -- cgit v1.2.3