diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..6855ddb3e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +**/dist +.DS_Store +Dockerfile diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3e68aa0c1..34d817a65 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -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 diff --git a/.github/workflows/repo.yaml b/.github/workflows/repo.yaml index bbfc064f7..85fb36946 100644 --- a/.github/workflows/repo.yaml +++ b/.github/workflows/repo.yaml @@ -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 @@ -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 @@ -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 diff --git a/package.json b/package.json index 78ab708d4..365523f5b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "MIT", "private": true, "engines": { - "node": ">=18" + "node": "18" }, "packageManager": "pnpm@8.15.9", "scripts": { diff --git a/packages/internal/pipe/package.json b/packages/internal/pipe/package.json index a6c721a56..0793ebb95 100644 --- a/packages/internal/pipe/package.json +++ b/packages/internal/pipe/package.json @@ -22,7 +22,6 @@ "default": "./dist/index.js" } }, - "dependencies": {}, "devDependencies": { "typescript": "^5.6.3" }, diff --git a/packages/internal/simple-store/package.json b/packages/internal/simple-store/package.json index 56ea3f5c9..66cf78b42 100644 --- a/packages/internal/simple-store/package.json +++ b/packages/internal/simple-store/package.json @@ -22,7 +22,6 @@ "default": "./dist/index.js" } }, - "dependencies": {}, "devDependencies": { "typescript": "^5.6.3" }, diff --git a/services/bsky/Dockerfile b/services/bsky/Dockerfile index 14480b844..4949f4885 100644 --- a/services/bsky/Dockerfile +++ b/services/bsky/Dockerfile @@ -1,9 +1,13 @@ FROM node:20.11-alpine as build -RUN npm install -g pnpm +RUN corepack enable + +WORKDIR /app + +COPY ./package.json ./ +RUN corepack prepare --activate # Move files into the image and install -WORKDIR /app COPY ./*.* ./ # NOTE bsky's transitive dependencies go here: if that changes, this needs to be updated. COPY ./tsconfig ./tsconfig diff --git a/services/bsky/package.json b/services/bsky/package.json index c1feff5b4..8a3eb306a 100644 --- a/services/bsky/package.json +++ b/services/bsky/package.json @@ -1,6 +1,7 @@ { "name": "bsky-app-view-service", "private": true, + "packageManager": "pnpm@8.15.9", "dependencies": { "@atproto/bsky": "workspace:^", "@atproto/crypto": "workspace:^", diff --git a/services/bsync/Dockerfile b/services/bsync/Dockerfile index 37eb682ea..746019ea3 100644 --- a/services/bsync/Dockerfile +++ b/services/bsync/Dockerfile @@ -1,9 +1,13 @@ FROM node:18-alpine as build -RUN npm install -g pnpm +RUN corepack enable + +WORKDIR /app + +COPY ./package.json ./ +RUN corepack prepare --activate # Move files into the image and install -WORKDIR /app COPY ./*.* ./ # NOTE bsync's transitive dependencies go here: if that changes, this needs to be updated. COPY ./tsconfig ./tsconfig diff --git a/services/bsync/package.json b/services/bsync/package.json index bf31aacb1..2c8cc7635 100644 --- a/services/bsync/package.json +++ b/services/bsync/package.json @@ -1,6 +1,7 @@ { "name": "bsync-service", "private": true, + "packageManager": "pnpm@8.15.9", "dependencies": { "@atproto/bsync": "workspace:^", "dd-trace": "3.13.2" diff --git a/services/ozone/Dockerfile b/services/ozone/Dockerfile index a43e2c0fa..fb42d9039 100644 --- a/services/ozone/Dockerfile +++ b/services/ozone/Dockerfile @@ -1,9 +1,13 @@ FROM node:18-alpine as build -RUN npm install -g pnpm +RUN corepack enable + +WORKDIR /app + +COPY ./package.json ./ +RUN corepack prepare --activate # Move files into the image and install -WORKDIR /app COPY ./*.* ./ # NOTE ozones's transitive dependencies go here: if that changes, this needs to be updated. COPY ./tsconfig ./tsconfig diff --git a/services/ozone/package.json b/services/ozone/package.json index e5f31bec4..6b2d5adb3 100644 --- a/services/ozone/package.json +++ b/services/ozone/package.json @@ -1,6 +1,7 @@ { "name": "ozone-service", "private": true, + "packageManager": "pnpm@8.15.9", "dependencies": { "@atproto/aws": "workspace:^", "@atproto/ozone": "workspace:^", diff --git a/services/pds/Dockerfile b/services/pds/Dockerfile index 702020356..ba6459f32 100644 --- a/services/pds/Dockerfile +++ b/services/pds/Dockerfile @@ -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 + +WORKDIR /app + +COPY ./package.json ./ +RUN corepack prepare --activate # Move files into the image and install -WORKDIR /app COPY ./*.* ./ # NOTE pds's transitive dependencies go here: if that changes, this needs to be updated. COPY ./tsconfig ./tsconfig diff --git a/services/pds/package.json b/services/pds/package.json index 398b20380..a25dc76e3 100644 --- a/services/pds/package.json +++ b/services/pds/package.json @@ -1,6 +1,7 @@ { "name": "plc-service", "private": true, + "packageManager": "pnpm@8.15.9", "dependencies": { "@atproto/pds": "workspace:^", "@opentelemetry/instrumentation": "^0.45.0",