Skip to content

Commit

Permalink
install pnpm through corepack (bluesky-social#2864)
Browse files Browse the repository at this point in the history
* install pnpm through corepack

* remove engine from services package.json
  • Loading branch information
matthieusieben authored Jan 3, 2025
1 parent 3442668 commit 3365bf8
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 29 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
**/dist
.DS_Store
Dockerfile
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v3
- run: corepack enable && corepack prepare --activate
- uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: package.json
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- run: pnpm build
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- run: corepack enable && corepack prepare --activate
- uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: package.json
cache: 'pnpm'
- name: Get current month
run: echo "CURRENT_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV
Expand All @@ -48,13 +45,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- run: corepack enable && corepack prepare --activate
- uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: package.json
cache: 'pnpm'
- name: Get current month
run: echo "CURRENT_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV
Expand All @@ -75,13 +69,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- run: corepack enable && corepack prepare --activate
- uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: package.json
cache: 'pnpm'
- name: Get current month
run: echo "CURRENT_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"private": true,
"engines": {
"node": ">=18"
"node": "18"
},
"packageManager": "[email protected]",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion packages/internal/pipe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"default": "./dist/index.js"
}
},
"dependencies": {},
"devDependencies": {
"typescript": "^5.6.3"
},
Expand Down
1 change: 0 additions & 1 deletion packages/internal/simple-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"default": "./dist/index.js"
}
},
"dependencies": {},
"devDependencies": {
"typescript": "^5.6.3"
},
Expand Down
8 changes: 6 additions & 2 deletions services/bsky/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM node:20.11-alpine as build

RUN npm install -g pnpm
RUN corepack enable

# Move files into the image and install
WORKDIR /app

COPY ./package.json ./
RUN corepack prepare --activate

# Move files into the image and install
COPY ./*.* ./
# NOTE bsky's transitive dependencies go here: if that changes, this needs to be updated.
COPY ./tsconfig ./tsconfig
Expand Down
1 change: 1 addition & 0 deletions services/bsky/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "bsky-app-view-service",
"private": true,
"packageManager": "[email protected]",
"dependencies": {
"@atproto/bsky": "workspace:^",
"@atproto/crypto": "workspace:^",
Expand Down
8 changes: 6 additions & 2 deletions services/bsync/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM node:18-alpine as build

RUN npm install -g pnpm
RUN corepack enable

# Move files into the image and install
WORKDIR /app

COPY ./package.json ./
RUN corepack prepare --activate

# Move files into the image and install
COPY ./*.* ./
# NOTE bsync's transitive dependencies go here: if that changes, this needs to be updated.
COPY ./tsconfig ./tsconfig
Expand Down
1 change: 1 addition & 0 deletions services/bsync/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "bsync-service",
"private": true,
"packageManager": "[email protected]",
"dependencies": {
"@atproto/bsync": "workspace:^",
"dd-trace": "3.13.2"
Expand Down
8 changes: 6 additions & 2 deletions services/ozone/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM node:18-alpine as build

RUN npm install -g pnpm
RUN corepack enable

# Move files into the image and install
WORKDIR /app

COPY ./package.json ./
RUN corepack prepare --activate

# Move files into the image and install
COPY ./*.* ./
# NOTE ozones's transitive dependencies go here: if that changes, this needs to be updated.
COPY ./tsconfig ./tsconfig
Expand Down
1 change: 1 addition & 0 deletions services/ozone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "ozone-service",
"private": true,
"packageManager": "[email protected]",
"dependencies": {
"@atproto/aws": "workspace:^",
"@atproto/ozone": "workspace:^",
Expand Down
8 changes: 6 additions & 2 deletions services/pds/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
# see additional reference to this image further down.
FROM node:20.11-alpine3.18 as build

RUN npm install -g pnpm
RUN corepack enable

# Move files into the image and install
WORKDIR /app

COPY ./package.json ./
RUN corepack prepare --activate

# Move files into the image and install
COPY ./*.* ./
# NOTE pds's transitive dependencies go here: if that changes, this needs to be updated.
COPY ./tsconfig ./tsconfig
Expand Down
1 change: 1 addition & 0 deletions services/pds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "plc-service",
"private": true,
"packageManager": "[email protected]",
"dependencies": {
"@atproto/pds": "workspace:^",
"@opentelemetry/instrumentation": "^0.45.0",
Expand Down

0 comments on commit 3365bf8

Please sign in to comment.