mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
39 lines
1.5 KiB
Docker
39 lines
1.5 KiB
Docker
FROM nginx:1.29.1-alpine AS base
|
|
LABEL org.label-schema.name="ocelot.social:maintenance"
|
|
LABEL org.label-schema.description="Maintenance page of the Social Network Software ocelot.social"
|
|
LABEL org.label-schema.usage="https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/README.md"
|
|
LABEL org.label-schema.url="https://ocelot.social"
|
|
LABEL org.label-schema.vcs-url="https://github.com/Ocelot-Social-Community/Ocelot-Social/tree/master/webapp"
|
|
LABEL org.label-schema.vendor="ocelot.social Community"
|
|
LABEL org.label-schema.schema-version="1.0"
|
|
LABEL maintainer="devops@ocelot.social"
|
|
|
|
FROM node:24.9.0-alpine AS styleguide
|
|
RUN apk --no-cache add git python3 make g++
|
|
RUN mkdir -p /app
|
|
WORKDIR /app
|
|
COPY styleguide .
|
|
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
|
RUN yarn run build:lib
|
|
|
|
FROM node:20.12.1-alpine AS build
|
|
ENV NODE_ENV="production"
|
|
RUN apk --no-cache add git python3 make g++ bash jq
|
|
COPY --from=styleguide ./app/ /styleguide/
|
|
RUN mkdir -p /app
|
|
WORKDIR /app
|
|
COPY webapp/ .
|
|
# Delete all Pages
|
|
RUN rm -rf ./pages
|
|
ONBUILD COPY webapp/branding .
|
|
ONBUILD RUN tools/merge-locales.sh
|
|
ONBUILD RUN yarn install --production=false --frozen-lockfile --non-interactive
|
|
ONBUILD RUN cp -r maintenance/source/* ./
|
|
ONBUILD RUN yarn run generate
|
|
|
|
FROM build AS production_build
|
|
|
|
FROM base AS production
|
|
COPY --from=production_build ./app/dist/ /usr/share/nginx/html/
|
|
COPY --from=production_build ./app/maintenance/nginx/custom.conf /etc/nginx/conf.d/default.conf
|