Skip to content
Snippets Groups Projects
Commit 2297c1d7 authored by Romain De Laage De Bellefaye's avatar Romain De Laage De Bellefaye
Browse files

[Whiteboard] Add landing page

parent 85d70209
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,8 @@ ENV WBVERSION=1.5 \
SCVERSION=0.1.11
RUN apk add --no-cache --virtual .download ca-certificates wget && \
apk add --no-cache nginx && \
mkdir /run/nginx && touch /run/nginx/nginx.pid && \
wget https://github.com/cracker0dks/whiteboard/archive/v$WBVERSION.tar.gz && \
wget https://github.com/aptible/supercronic/releases/download/v$SCVERSION/supercronic-linux-amd64 && \
chmod +x supercronic-linux-amd64 && \
......@@ -16,9 +18,11 @@ RUN apk add --no-cache --virtual .download ca-certificates wget && \
apk del .download
ADD entrypoint.sh /entrypoint.sh
ADD default.conf /etc/nginx/conf.d/default.conf
ADD index.html /var/www/localhost/htdocs/index.html
RUN chmod +x /entrypoint.sh
EXPOSE 8080
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/localhost/htdocs;
index index.html;
location / {
try_files $uri $uri/ =404;
}
location /app/ {
proxy_pass http://whiteboard-app:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
......@@ -11,7 +11,7 @@ services:
labels:
traefik.http.routers.whiteboard-app.entrypoints: websecure
traefik.http.routers.whiteboard-app.rule: Host(`whiteboard.picasoft.net`)
traefik.http.services.whiteboard-app.loadbalancer.server.port: 8080
traefik.http.services.whiteboard-app.loadbalancer.server.port: 80
traefik.enable: true
environment:
STOP_APP: "0 0 * * *"
......
......@@ -6,4 +6,5 @@ $STOP_APP pkill node
$RESTART_APP cd /opt/whiteboard && node server.js --mode=production
EOF
node server.js --mode=production &
nginx
supercronic crontab
<!DOCTYPE html>
<html>
<head>
<title>Whiteboard Picasoft</title>
<meta charset="utf-8" />
</head>
<body>
<h1>Whiteboard de Picasoft</h1>
<p>
Vous êtes sur le whiteboard hébergé par Picasoft, celui-ci est réinitialisé toutes les nuits (vers minuit)
</p>
<p>
<a href⁼"https://picasoft.net/co/cgu.html">CGU</a>
</p>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment