app-server
Serve and apply runtime configuration to static apps
10K+
A tool to serve and apply runtime configuration to static apps. This is the base docker image containing the app-server executable. To use it, you need to build upon it and "add in" the static app you want to serve.
# First docker stage: build the app
FROM node
# Build your app. For example you could do something like:
# COPY . .
# RUN npm install
# RUN npm run build
# Second docker stage: copy artifacts into the staticdeploy/app-server image
FROM staticdeploy/app-server:vX.Y.Z
# Copy artifacts from the previous stage (assuming they were produced in the
# /dist directory) into the /build directory of the image, the default directory
# served by app-server
COPY --from=0 /dist /build
Or, if you're app is built with create-react-app:
FROM staticdeploy/app-server:vX.Y.Z-cra-builder
FROM staticdeploy/app-server:vX.Y.Z-cra-runtime
docker run -p 80:80 -e APP_CONFIG_MY_VAR=my_val my-app-image
Content type
Image
Digest
Size
84.7 MB
Last updated
about 4 years ago
docker pull staticdeploy/app-server:multiarch-build-cra-runtime