mirror of
https://github.com/SrIzan10/vinci.git
synced 2026-06-06 01:07:00 +00:00
feat: ready to deploy
This commit is contained in:
46
Dockerfile
46
Dockerfile
@@ -1,31 +1,35 @@
|
||||
FROM node:lts
|
||||
|
||||
# Build stage
|
||||
FROM node:lts-alpine AS build
|
||||
|
||||
FROM oven/bun:alpine AS base
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache --virtual .gyp python3 make g++
|
||||
# Install dependencies
|
||||
FROM base AS deps
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
# Build the application
|
||||
FROM base AS build
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN corepack enable yarn
|
||||
RUN yarn
|
||||
|
||||
RUN yarn build
|
||||
|
||||
# Final stage
|
||||
FROM node:lts-alpine AS final
|
||||
RUN bun prisma generate
|
||||
RUN bun run build
|
||||
|
||||
# Production image
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/src ./src
|
||||
COPY --from=build /app/.sern ./.sern
|
||||
COPY --from=build /app/assets ./assets
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/package.json ./package.json
|
||||
RUN apk add --no-cache ffmpeg msttcorefonts-installer fontconfig && \
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Install system dependencies
|
||||
RUN apk add --no-cache ffmpeg fontconfig ttf-opensans msttcorefonts-installer && \
|
||||
update-ms-fonts && \
|
||||
fc-cache -f
|
||||
|
||||
CMD ["node", "dist/index.js"]
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/assets ./assets
|
||||
COPY --from=build /app/images ./images
|
||||
COPY --from=build /app/.sern ./.sern
|
||||
COPY --from=build /app/package.json ./package.json
|
||||
COPY --from=build /app/prisma ./prisma
|
||||
|
||||
CMD ["bun", "dist/index.js"]
|
||||
|
||||
1
bun.lock
1
bun.lock
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"configVersion": 0,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "ts-example",
|
||||
|
||||
@@ -35,6 +35,9 @@ export default commandModule({
|
||||
ctxCanvas.fillStyle = 'white';
|
||||
ctxCanvas.textAlign = 'center';
|
||||
ctxCanvas.textBaseline = 'middle';
|
||||
ctxCanvas.strokeStyle = 'black';
|
||||
ctxCanvas.lineWidth = 4;
|
||||
ctxCanvas.strokeText(texto, canvas.width / 2, canvas.height - 510);
|
||||
ctxCanvas.fillText(texto, canvas.width / 2, canvas.height - 510);
|
||||
|
||||
const encode = await canvas.encode('png');
|
||||
|
||||
@@ -100,7 +100,7 @@ export class WordController extends EventEmitter {
|
||||
const startX = 250 - (wordLength * 20);
|
||||
const baseY = 450;
|
||||
|
||||
this.canvasCtx.font = '20px Arial';
|
||||
this.canvasCtx.font = '20px "Open Sans", Verdana';
|
||||
this.canvasCtx.textAlign = 'center';
|
||||
this.canvasCtx.fillStyle = '#cdd6f4';
|
||||
this.canvasCtx.strokeStyle = '#cdd6f4';
|
||||
|
||||
Reference in New Issue
Block a user