forked from dkhokhlov/metrics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (18 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
22 lines (18 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use original pre-built image as base (contains all dependencies)
# This avoids rebuilding Chrome, Node modules, etc. when only code changes
ARG BASE_IMAGE=ghcr.io/lowlighter/metrics:v3.35-beta
FROM ${BASE_IMAGE} as base
# Copy only our changed files (GraphQL queries and JS code)
# This is much faster than rebuilding everything
COPY source/plugins/achievements/queries/achievements.graphql /metrics/source/plugins/achievements/queries/achievements.graphql
COPY source/plugins/achievements/queries/organizations.graphql /metrics/source/plugins/achievements/queries/organizations.graphql
COPY source/plugins/achievements/list/users.mjs /metrics/source/plugins/achievements/list/users.mjs
COPY source/plugins/achievements/list/organizations.mjs /metrics/source/plugins/achievements/list/organizations.mjs
COPY source/plugins/habits/index.mjs /metrics/source/plugins/habits/index.mjs
# No need to rebuild - the base image already has everything installed
# Our code changes are just file replacements
# Environment variables
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_BROWSER_PATH "google-chrome-stable"
# Execute GitHub action
ENTRYPOINT node /metrics/source/app/action/index.mjs