diff --git a/.Dockerfile.swl b/.Dockerfile.swl new file mode 100644 index 000000000..b29f78f30 Binary files /dev/null and b/.Dockerfile.swl differ diff --git a/.Dockerfile.swm b/.Dockerfile.swm new file mode 100644 index 000000000..a6812bb0f Binary files /dev/null and b/.Dockerfile.swm differ diff --git a/.Dockerfile.swn b/.Dockerfile.swn new file mode 100644 index 000000000..851caf10c Binary files /dev/null and b/.Dockerfile.swn differ diff --git a/.Dockerfile.swo b/.Dockerfile.swo new file mode 100644 index 000000000..9a528a743 Binary files /dev/null and b/.Dockerfile.swo differ diff --git a/.Dockerfile.swp b/.Dockerfile.swp new file mode 100644 index 000000000..e69f67710 Binary files /dev/null and b/.Dockerfile.swp differ diff --git a/; b/; new file mode 100644 index 000000000..5764aad8e --- /dev/null +++ b/; @@ -0,0 +1,42 @@ +# Install the base requirements for the app. +# This stage is to support development. +FROM --platform=$BUILDPLATFORM python:alpine AS base +WORKDIR /app +COPY requirements.txt . +RUN pip install -r requirements.txt + +FROM --platform=$BUILDPLATFORM node:18-alpine AS app-base +WORKDIR /app +COPY app/package.json app/yarn.lock ./ +COPY app/spec ./spec +COPY app/src ./src + +# Run tests to validate app +FROM app-base AS test +COPY .yarnrc.yml . +RUN yarn install --immutable +RUN yarn test + +# Clear out the node_modules and create the zip +FROM app-base AS app-zip-creator +COPY --from=test /app/package.json /app/yarn.lock ./ +COPY app/spec ./spec +COPY app/src ./src +RUN apk add zip && \ + zip -r /app.zip /app + +# Dev-ready container - actual files will be mounted in +FROM --platform=$BUILDPLATFORM base AS dev +CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"] + +# Do the actual build of the mkdocs site +FROM --platform=$BUILDPLATFORM base AS build +COPY . . +RUN mkdocs build + +# Extract the static content from the build +# and use a nginx image to serve the content +FROM --platform=$TARGETPLATFORM nginx:alpine +COPY --from=app-zip-creator /app.zip /usr/share/nginx/html/assets/app.zip +COPY --from=build /app/site /usr/share/nginx/html + diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 index 5b9ee4def..c45d8679c --- a/Dockerfile +++ b/Dockerfile @@ -39,3 +39,17 @@ RUN mkdocs build FROM --platform=$TARGETPLATFORM nginx:alpine COPY --from=app-zip-creator /app.zip /usr/share/nginx/html/assets/app.zip COPY --from=build /app/site /usr/share/nginx/html + +FROM node:20-alpine + +WORKDIR /app + +COPY package*.json ./ + +RUN npm install + +COPY . . + +EXPOSE 3000 + +CMD ["npm", "start"] diff --git a/Dockerfile1 b/Dockerfile1 new file mode 100644 index 000000000..6671da057 --- /dev/null +++ b/Dockerfile1 @@ -0,0 +1,14 @@ + +FROM node:20-alpine + +WORKDIR /app + +COPY package*.json ./ + +RUN npm install + +COPY . . + +EXPOSE 3000 + +CMD ["npm", "start"] diff --git a/app/src/static/index.html b/app/src/static/index.html index 3f6fb5be0..7d5f3e50c 100644 --- a/app/src/static/index.html +++ b/app/src/static/index.html @@ -8,7 +8,7 @@ - Todo App + Todo App List