feat: add a dummy web UI served by nginx in a container

This commit is contained in:
Alexis Fourmaux 2026-05-11 21:47:57 +02:00
parent e605bf8603
commit 4bd3ab2d2d
5 changed files with 54 additions and 0 deletions

View file

@ -19,6 +19,16 @@ services:
- public
- database
webui:
build: ./frontend
image: simugaz/frontend:latest
ports:
- 3000:80
networks:
- public
depends_on:
- api
db:
image: postgres:18-alpine
restart: unless-stopped

View file

@ -0,0 +1,6 @@
FROM nginx:alpine
COPY public/ /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80

View file

@ -0,0 +1,23 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /assets/ {
expires 1y;
add_header Cache-Control "public";
}
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
}

View file

@ -0,0 +1,3 @@
h1 {
color: blue;
}

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang='fr'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>Simugaz WebUI</title>
<link rel='stylesheet' href='/assets/css/main.css'>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>