Intial Version
This commit is contained in:
49
backend/Dockerfile
Normal file
49
backend/Dockerfile
Normal file
@@ -0,0 +1,49 @@
|
||||
FROM node:20-slim
|
||||
|
||||
# Install Playwright dependencies and PostgreSQL client
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libnss3 \
|
||||
libnspr4 \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
libcups2 \
|
||||
libdrm2 \
|
||||
libdbus-1-3 \
|
||||
libxkbcommon0 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxfixes3 \
|
||||
libxrandr2 \
|
||||
libgbm1 \
|
||||
libasound2 \
|
||||
libpango-1.0-0 \
|
||||
libcairo2 \
|
||||
postgresql-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
COPY prisma ./prisma/
|
||||
|
||||
# Install dependencies (including dev dependencies for Prisma)
|
||||
RUN npm install
|
||||
|
||||
# Install Playwright browsers
|
||||
RUN npx playwright install chromium --with-deps
|
||||
|
||||
# Generate Prisma client
|
||||
RUN npx prisma generate
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Build TypeScript
|
||||
RUN npm run build
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
# Start application (migrations will be run via docker-compose command)
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user