staticdeploy/app-server

By staticdeploy

Updated about 4 years ago

Serve and apply runtime configuration to static apps

Image
Security
Integration & delivery
Web servers
0

10K+

staticdeploy/app-server repository overview

app-server

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.

Building the image for your app

# 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

Running your app's image

docker run -p 80:80 -e APP_CONFIG_MY_VAR=my_val my-app-image

See the docs for all of app-server config options.

Tag summary

Content type

Image

Digest

Size

84.7 MB

Last updated

about 4 years ago

docker pull staticdeploy/app-server:multiarch-build-cra-runtime