Dockerize

This commit is contained in:
PROFERIS - Mi³osz Stocki
2026-07-07 12:09:24 +02:00
parent 7582b949b4
commit 22fcc25c5e
4 changed files with 46 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
FROM python:3-alpine
WORKDIR /app
# Copy only the necessary web assets
COPY index.html favicon.svg ./
COPY web/ ./web/
# Expose a random non-standard port
EXPOSE 8421
# Run the python HTTP server
CMD ["python", "-m", "http.server", "8421"]
+9
View File
@@ -0,0 +1,9 @@
services:
wiji-web:
build:
context: ..
dockerfile: deploy/Dockerfile
container_name: wiji-web
restart: unless-stopped
ports:
- "8421:8421"
+12
View File
@@ -0,0 +1,12 @@
server {
listen 80;
server_name esp32s3-wiji;
location / {
proxy_pass http://wiji-web:8421;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
+12
View File
@@ -0,0 +1,12 @@
[Unit]
Description=WijiBoard Web Frontend Container
After=network-online.target
[Container]
# Assuming the image is built locally as wiji-web:latest
Image=localhost/wiji-web:latest
ContainerName=wiji-web
PublishPort=8421:8421
[Install]
WantedBy=default.target