-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (34 loc) · 927 Bytes
/
Dockerfile
File metadata and controls
46 lines (34 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Railway deployment Dockerfile
FROM node:20-alpine
# Install pnpm
RUN npm install -g pnpm@8.15.6
# Install Chromium and dependencies for Puppeteer
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
font-noto-emoji
# Tell Puppeteer to use the installed Chromium
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json ./
# Copy all workspace package.json files
COPY packages/ ./packages/
COPY apps/api/package.json ./apps/api/
# Install dependencies
RUN pnpm install --no-frozen-lockfile
# Copy source code
COPY . .
# Build the API
RUN pnpm build --filter=@hackathon/api
# Expose port
EXPOSE 4000
# Set environment
ENV NODE_ENV=production
# Start the application
CMD ["node", "apps/api/dist/main.js"]