forked from github/plane
bdca84bd09
* minor docker fixes * eslint config changes * dockerfile changes to backend and frontend * oauth enabled env flag * sentry enabled env flag * build: get alternatives for environment variables and static file storage * build: automatically generate random secret key if not provided * build: update docker compose for next url env add channels to requirements for asgi server and save files in local machine for docker environment * build: update nginx conf for backend base url update backend dockerfile to make way for static file uploads * feat: create a default user with given values else default values * chore: update docker python version and other dependency version in docker * build: update local settings file to run it in docker * fix: update script to run in default production setting * fix: env variable changes and env setup shell script added * Added Single Dockerfile to run the Entire plane application * docs build fixes --------- Co-authored-by: Narayana <narayana.vadapalli1996@gmail.com> Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
52 lines
1.4 KiB
Docker
52 lines
1.4 KiB
Docker
FROM node:18-alpine AS builder
|
|
RUN apk add --no-cache libc6-compat
|
|
RUN apk update
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
RUN yarn global add turbo
|
|
COPY . .
|
|
|
|
RUN turbo prune --scope=app --docker
|
|
|
|
# Add lockfile and package.json's of isolated subworkspace
|
|
FROM node:18-alpine AS installer
|
|
|
|
|
|
RUN apk add --no-cache libc6-compat
|
|
RUN apk update
|
|
WORKDIR /app
|
|
|
|
# First install the dependencies (as they change less often)
|
|
COPY .gitignore .gitignore
|
|
COPY --from=builder /app/out/json/ .
|
|
COPY --from=builder /app/out/yarn.lock ./yarn.lock
|
|
RUN yarn install
|
|
|
|
# Build the project
|
|
COPY --from=builder /app/out/full/ .
|
|
COPY turbo.json turbo.json
|
|
|
|
RUN yarn turbo run build --filter=app
|
|
|
|
FROM node:18-alpine AS runner
|
|
WORKDIR /app
|
|
|
|
# Don't run production as root
|
|
RUN addgroup --system --gid 1001 plane
|
|
RUN adduser --system --uid 1001 captain
|
|
USER captain
|
|
|
|
COPY --from=installer /app/apps/app/next.config.js .
|
|
COPY --from=installer /app/apps/app/package.json .
|
|
|
|
# Automatically leverage output traces to reduce image size
|
|
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
|
COPY --from=installer --chown=captain:plane /app/apps/app/.next/standalone ./
|
|
# COPY --from=installer --chown=captain:plane /app/apps/app/.next/standalone/node_modules ./apps/app/node_modules
|
|
COPY --from=installer --chown=captain:plane /app/apps/app/.next/static ./apps/app/.next/static
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED 1
|
|
|
|
EXPOSE 3000
|