forked from saeloun/miru-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
71 lines (64 loc) · 1.72 KB
/
Copy pathDockerfile.base
File metadata and controls
71 lines (64 loc) · 1.72 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Miru 2.0 Base Image - Optimized for Rails 8 & Playwright
# Build once and push to registry for reuse across environments
FROM ruby:4.0.1-slim AS miru-base
# Install essential system dependencies
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
# Build essentials
build-essential \
pkg-config \
# PostgreSQL
libpq-dev \
postgresql-client \
# Version control
git \
# Network tools
curl \
wget \
gnupg \
ca-certificates \
# Image processing
libvips \
imagemagick \
# Playwright dependencies (browsers)
libnss3 \
libnspr4 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libdbus-1-3 \
libatspi2.0-0 \
libx11-6 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libxcb1 \
libxkbcommon0 \
libgtk-3-0 \
libpango-1.0-0 \
libcairo2 \
libasound2 \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js 22 LTS
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y --no-install-recommends nodejs && \
rm -rf /var/lib/apt/lists/*
# Install pnpm (fast, disk space efficient package manager)
RUN npm install -g pnpm@9.15.5
# Install only Chromium for Playwright (no Firefox or WebKit needed)
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
RUN npx playwright install chromium
# Set Ruby and Node environment variables
ENV BUNDLE_PATH=/usr/local/bundle \
BUNDLE_BIN=/usr/local/bundle/bin \
GEM_HOME=/usr/local/bundle \
PATH="/usr/local/bundle/bin:${PATH}" \
# Playwright configuration
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
# Create necessary directories
RUN mkdir -p /tmp/pids /app
WORKDIR /app