File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ VITE_IS_DEMO="false"
1919# DATABASE
2020DATABASE_URL = " postgres://${ DOCKER_DATABASE_USERNAME } :${ DOCKER_DATABASE_PASSWORD } @localhost:${ DOCKER_DATABASE_PORT } /${ DOCKER_DATABASE_NAME } "
2121
22+ # for docker build use:
23+ # DATABASE_URL="postgres://${DOCKER_DATABASE_USERNAME}:${DOCKER_DATABASE_PASSWORD}start-ui-web-postgres-1/${DOCKER_DATABASE_NAME}"
24+
2225# AUTH
2326AUTH_SECRET = " REPLACE ME" # You can use `npx @better-auth/cli@latest secret` to a generated secret
2427AUTH_SESSION_EXPIRATION_IN_SECONDS = 2592000 # 30 days
Original file line number Diff line number Diff line change @@ -17,13 +17,15 @@ COPY package.json pnpm-lock.yaml ./
1717COPY run-jiti.js ./
1818COPY src/features/build-info/script-to-generate-json.ts src/features/build-info/build-info.gen.json ./src/features/build-info/
1919COPY prisma/schema.prisma ./prisma/
20+
2021RUN pnpm install --frozen-lockfile
2122
2223# copy source
2324COPY . .
2425
25- # build .output
2626ENV NODE_OPTIONS=--max-old-space-size=4096
27+
28+ # build app
2729RUN pnpm build
2830
2931
@@ -33,6 +35,11 @@ FROM node:22-alpine AS runtime
3335
3436WORKDIR /app
3537
38+ # ENV
39+ ENV NODE_ENV=production
40+ ENV HOST=0.0.0.0
41+ ENV PORT=3000
42+
3643# install pnpm
3744RUN npm install -g pnpm npm-run-all
3845
@@ -46,11 +53,6 @@ COPY --from=builder /app/package.json ./package.json
4653COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml
4754COPY --from=builder /app/node_modules ./node_modules
4855
49- ENV NODE_ENV=production
50-
51- ENV HOST=0.0.0.0
52- ENV PORT=3000
53-
5456EXPOSE 3000
5557
5658# start
Original file line number Diff line number Diff line change 3636 "dk:start" : " docker compose start" ,
3737 "dk:stop" : " docker compose stop" ,
3838 "dk:clear" : " docker compose down --volumes" ,
39+ "dk:build" : " docker build -t start-ui-web . && docker run -d --network start-ui-web_default -p 3000:3000 --name start-ui-web-container start-ui-web" ,
3940 "db:init" : " pnpm db:push && pnpm db:seed" ,
4041 "db:push" : " prisma db push" ,
4142 "db:ui" : " prisma studio" ,
You can’t perform that action at this time.
0 commit comments