Improve webpull

This commit is contained in:
Quentin 2020-04-21 12:38:15 +02:00
parent 4c2ae7f696
commit 1c4bc090fc
6 changed files with 41 additions and 9 deletions

View file

@ -1,8 +1,7 @@
FROM node:13.8-buster
RUN apt-get update && \
apt-get install -y git && \
npm install -g pug-cli jstransformer-markdown-it
apt-get install -y git
COPY ./main /srv/httpd
WORKDIR /srv

View file

@ -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"]

View file

@ -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.pug -t superboum/amd64_webpull_pug:v1
sudo docker build -f ./Dockerfile.nodejs -t superboum/amd64_webpull_pug:v1 .
```
## Ruby version
```
go build ./main.go
sudo docker build -f ./Dockerfile.ruby -t superboum/amd64_webpull_ruby:v1 .
```

View file

@ -93,7 +93,7 @@ job "jitsi" {
task "front" {
driver = "docker"
config {
image = "superboum/amd64_jitsi_front:v3"
image = "superboum/amd64_jitsi_front:v4"
network_mode = "host"
port_map {
https_port = 443

View file

@ -59,19 +59,27 @@ EOH
}
}
/* To be replaced by a static site manager */
group "quentin" {
task "server" {
driver = "docker"
config {
image = "superboum/amd64_blog:v19"
image = "superboum/amd64_webpull_ruby:v1"
port_map {
web_port = 8043
web_port = 8080
}
}
template {
data = <<EOH
WEBPULL_REPO="https://git.deuxfleurs.fr/quentin/quentin.dufour.io.git"
WEBPULL_TOKEN="{{ key "secrets/web/quentin.dufour.io_token" | trimSpace }}"
EOH
destination = "secrets/env"
env = true
}
resources {
memory = 20
memory = 500
network {
port "web_port" {}
}