FROM node:20-alpine
RUN apk add --no-cache libc6-compat
# Set working directory
WORKDIR /app

COPY . .

RUN yarn global add turbo
RUN yarn install

EXPOSE 4000

ENV NEXT_PUBLIC_SPACE_BASE_PATH="/spaces"

VOLUME [ "/app/node_modules", "/app/space/node_modules"]
CMD ["yarn","dev", "--filter=space"]
