2019-07-26 18:59:22 +03:00
|
|
|
# Builder
|
2021-11-15 23:35:23 +03:00
|
|
|
FROM node:lts as builder
|
2024-08-31 15:14:44 +03:00
|
|
|
LABEL org.opencontainers.image.url=https://github.com/etkecc/synapse-admin org.opencontainers.image.source=https://github.com/etkecc/synapse-admin
|
2024-04-24 17:00:55 +03:00
|
|
|
# Base path for synapse admin
|
|
|
|
ARG BASE_PATH=./
|
2022-05-23 15:06:04 +03:00
|
|
|
|
2019-07-26 18:59:22 +03:00
|
|
|
WORKDIR /src
|
|
|
|
|
2024-04-18 20:05:07 +03:00
|
|
|
# Copy .yarn directory to the working directory (must be on a separate line!)
|
|
|
|
# Use https://docs.docker.com/engine/reference/builder/#copy---parents when available
|
|
|
|
COPY .yarn .yarn
|
|
|
|
COPY package.json .yarnrc.yml yarn.lock ./
|
|
|
|
|
|
|
|
# Disable telemetry and install packages
|
|
|
|
RUN yarn config set enableTelemetry 0 && yarn install --immutable --network-timeout=300000
|
|
|
|
|
2019-07-26 18:59:22 +03:00
|
|
|
COPY . /src
|
2024-04-24 17:00:55 +03:00
|
|
|
RUN yarn build --base=$BASE_PATH
|
2019-07-26 18:59:22 +03:00
|
|
|
|
|
|
|
# App
|
2024-09-03 14:02:35 +03:00
|
|
|
FROM ghcr.io/static-web-server/static-web-server:2
|
2019-07-26 18:59:22 +03:00
|
|
|
|
2024-09-03 14:02:35 +03:00
|
|
|
ENV SERVER_ROOT /app
|
2019-07-26 18:59:22 +03:00
|
|
|
|
2024-09-03 14:02:35 +03:00
|
|
|
COPY --from=builder /src/dist /app
|