From 33ffeb935261cac04e0933e3f871709727a0ed1c Mon Sep 17 00:00:00 2001 From: Alexandre Dos Reis <54753383+alexandre-dos-reis@users.noreply.github.com> Date: Fri, 14 Oct 2022 19:14:35 +0200 Subject: [PATCH] Update README.md Added an example in the README file for setting up a fallback in case of a SPA setup. --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index be5e8cb..acbac6a 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,14 @@ The fallback option is principally useful for single-page applications (SPAs) wh The second case is useful if you have multiple SPAs within the one filesystem. e.g., */* and */admin*. +Example with a absolute path for a SPA setup : + +```dockerfile +FROM pierrezemb/gostatic:latest +COPY ./your/dist/folder /srv/http +EXPOSE 8043 +CMD [ "-fallback", "index.html" ] +``` ## Build @@ -84,4 +92,4 @@ The second case is useful if you have multiple SPAs within the one filesystem. e ```bash docker buildx create --use --name=cross docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v5,linux/arm/v6,linux/arm/v7,darwin/amd64,darwin/arm64,windows/amd64 . -``` \ No newline at end of file +```