webpull
This commit is contained in:
parent
c8c2cdf8d4
commit
163472bed9
5 changed files with 31 additions and 4 deletions
0
consul/secrets/web/home_token.sample
Normal file
0
consul/secrets/web/home_token.sample
Normal file
1
docker/webpull/.gitignore
vendored
Normal file
1
docker/webpull/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
main
|
10
docker/webpull/Dockerfile.pug
Normal file
10
docker/webpull/Dockerfile.pug
Normal file
|
@ -0,0 +1,10 @@
|
|||
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"]
|
||||
|
|
@ -1,3 +1,10 @@
|
|||
# webpull
|
||||
|
||||
Webpull allows you to update your live website without deploying a new docker container but by simply calling an URL
|
||||
|
||||
## Pug version
|
||||
|
||||
```
|
||||
go build ./main.go
|
||||
sudo docker build -f ./Dockerfile.pug -t superboum/amd64_webpull_pug:v1
|
||||
```
|
||||
|
|
|
@ -11,14 +11,23 @@ job "web_static" {
|
|||
task "server" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "superboum/amd64_landing:v8"
|
||||
image = "superboum/amd64_webpull_pug:v4"
|
||||
port_map {
|
||||
web_port = 8043
|
||||
web_port = 8080
|
||||
}
|
||||
}
|
||||
|
||||
template {
|
||||
data = <<EOH
|
||||
WEBPULL_REPO="https://git.deuxfleurs.fr/Deuxfleurs/site.git"
|
||||
WEBPULL_TOKEN="{{ key "secrets/web/home_token" | trimSpace }}"
|
||||
EOH
|
||||
destination = "secrets/env"
|
||||
env = true
|
||||
}
|
||||
|
||||
resources {
|
||||
memory = 20
|
||||
memory = 200
|
||||
network {
|
||||
port "web_port" {}
|
||||
}
|
||||
|
@ -29,7 +38,7 @@ job "web_static" {
|
|||
"webstatic",
|
||||
"traefik.enable=true",
|
||||
"traefik.frontend.entryPoints=https,http",
|
||||
"traefik.frontend.rule=Host:deuxfleurs.fr,www.deuxfleurs.fr,deuxfleurs.org,www.deuxfleurs.org;Path:/,/robots.txt,/landing/arobase.png"
|
||||
"traefik.frontend.rule=Host:deuxfleurs.fr,www.deuxfleurs.fr,deuxfleurs.org,www.deuxfleurs.org;PathPrefix:/"
|
||||
]
|
||||
port = "web_port"
|
||||
address_mode = "host"
|
||||
|
|
Reference in a new issue