Files
no-twitter-bot-stats/Dockerfile
Lucid e0974d1468
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 8m4s
Fixed production issues, fixed render issues, adde
d secret and env variables into dockerfile and gihub actions files, remade dockerfile and github actions

added build stage

fix build step

remove the second section

asdas

test new file

fix env variables

env

enable corepack

test yarn install

new base

remove corepack

fix yarn install

yarn install

new base (again)

new base

corepack

install yarn

enable corepack

revert base

fix yarn

yarn install

fix build errors

new file

remove in-line comment

update copy command

copy node_monudes

test

workdir top level

ls app folder

test ls

update yarn install

copy more files

remove copy

fix copy

move workdir to top level

fix copy

check folder

test

fix copy - last try

prisma gen

database url secret / env variable for ci/cd

args

env var

args

fix env

fix copy

fix build file name

fix start command

added copy

ANOTHER COPY

copy prisma generated files, fix start command

remove standalone config

fix urql url

update display
2025-12-06 18:41:07 -05:00

41 lines
1.0 KiB
Docker

# --- Stage 1: Dependencies ---
FROM node:20-alpine AS dependencies
RUN corepack enable
RUN corepack prepare yarn@stable --activate
WORKDIR /app
COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install
# --- Stage 2: Builder ---
FROM node:20-alpine AS builder
RUN corepack enable
RUN corepack prepare yarn@stable --activate
ARG DATABASE_URL
ENV DATABASE_URL=${DATABASE_URL}
RUN corepack enable
RUN corepack prepare yarn@stable --activate
WORKDIR /app
COPY --from=dependencies /app/node_modules ./node_modules
COPY . ./
RUN yarn prisma-gen
RUN yarn build
# --- Stage 3: Runner ---
FROM node:20-alpine AS runner
RUN corepack enable
RUN corepack prepare yarn@stable --activate
ARG DATABASE_URL
ENV DATABASE_URL=${DATABASE_URL}
RUN corepack enable
RUN corepack prepare yarn@stable --activate
WORKDIR /app
COPY --from=dependencies /app/node_modules ./node_modules
COPY --from=builder /app/src/prisma/generated ./src/prisma/generated
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/.yarn ./.yarn
COPY . ./
EXPOSE 3000
CMD ["yarn", "start"]