Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎉 Feature: support dockerized execution with single command 🐳 #825

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.gitignore
.git
.github
*.md
dist
node_modules/
Dockerfile
docker-compose.yaml
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build

FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
EXPOSE 8000

FROM base AS app-dependencies

WORKDIR /github.com/marcellodesales/probot

COPY package* .

RUN pnpm install

FROM app-dependencies

COPY . .

RUN pnpm run build

ENTRYPOINT [ "node", "./bin/create-probot-app.js" ]
7 changes: 7 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:

create-probot-app:
image: marcellodesales/create-probot-app
build:
context: .

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"jsesc": "^3.0.2",
"lodash.camelcase": "^4.3.0",
"lodash.kebabcase": "^4.1.1",
"npm": "^7.0.0",
"simple-git": "^3.22.0",
"stringify-author": "^0.1.3",
"validate-npm-package-name": "^5.0.0"
Expand Down
Loading