Package Fieldwork storefront for Docker

This commit is contained in:
2026-11-07 20:16:27 -07:00
parent bae4b557ae
commit d360fd7db3
5 changed files with 40 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
**
!Caddyfile
!dist/
!dist/**
+5
View File
@@ -0,0 +1,5 @@
:8080 {
root * /srv/fieldwork
encode zstd gzip
file_server
}
+20
View File
@@ -0,0 +1,20 @@
# Fieldwork Supply in Docker
Run these commands from this directory with Docker Compose available.
```sh
docker compose up -d --build
```
Open [the local storefront](http://127.0.0.1:8088). The service binds to
loopback. To use another local port, set `FIELDWORK_PORT` before running Compose.
```sh
docker compose ps
docker compose logs storefront
docker compose down
```
The image serves the static storefront from `dist/` using Caddy. Rebuild after
changing those files. The cart is stored in the visitor's browser and checkout
simulates an order.
+3
View File
@@ -0,0 +1,3 @@
FROM caddy:2
COPY Caddyfile /etc/caddy/Caddyfile
COPY dist/ /srv/fieldwork/
+8
View File
@@ -0,0 +1,8 @@
name: fieldwork
services:
storefront:
image: fieldwork-storefront:local
build: .
ports:
- "127.0.0.1:${FIELDWORK_PORT:-8088}:8080"
restart: unless-stopped