Package Fieldwork storefront for Docker
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
**
|
||||
!Caddyfile
|
||||
!dist/
|
||||
!dist/**
|
||||
@@ -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.
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM caddy:2
|
||||
COPY Caddyfile /etc/caddy/Caddyfile
|
||||
COPY dist/ /srv/fieldwork/
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user