Skip to content

Commit aeb247a

Browse files
fix build
1 parent b5aa924 commit aeb247a

File tree

3 files changed

+694
-1987
lines changed

3 files changed

+694
-1987
lines changed

Dockerfile

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1.2
22

33
# Stage 1 - Create yarn install skeleton layer
4-
FROM node:18-bookworm-slim AS packages
4+
FROM node:20-bookworm-slim AS packages
55

66
WORKDIR /app
77
COPY package.json yarn.lock ./
@@ -14,14 +14,14 @@ COPY plugins plugins
1414
RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -exec rm -rf {} \+
1515

1616
# Stage 2 - Install dependencies and build packages
17-
FROM node:18-bookworm-slim AS build
17+
FROM node:20-bookworm-slim AS build
1818

1919
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
2020
RUN apt-get update && \
21-
apt-get install -y --no-install-recommends python3 g++ build-essential && \
21+
apt-get install -y --no-install-recommends python3 g++ git build-essential && \
2222
yarn config set python /usr/bin/python3
2323

24-
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
24+
# Install sqlite3 dependencies. You can skip this if yo=u don't use sqlite3 in the image,
2525
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
2626
RUN apt-get update && \
2727
apt-get install -y --no-install-recommends libsqlite3-dev
@@ -40,15 +40,13 @@ COPY --chown=node:node . .
4040

4141
RUN yarn tsc
4242
RUN yarn --cwd packages/backend build
43-
# If you have not yet migrated to package roles, use the following command instead:
44-
# RUN yarn --cwd packages/backend backstage-cli backend:bundle --build-dependencies
4543

4644
RUN mkdir packages/backend/dist/skeleton packages/backend/dist/bundle \
4745
&& tar xzf packages/backend/dist/skeleton.tar.gz -C packages/backend/dist/skeleton \
4846
&& tar xzf packages/backend/dist/bundle.tar.gz -C packages/backend/dist/bundle
4947

5048
# Stage 3 - Build the actual backend image and install production dependencies
51-
FROM node:18-bookworm-slim
49+
FROM node:20-bookworm-slim
5250

5351
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
5452
RUN apt-get update && \
@@ -63,11 +61,6 @@ RUN apt-get update && \
6361
# From here on we use the least-privileged `node` user to run the backend.
6462
USER node
6563

66-
# This should create the app dir as `node`.
67-
# If it is instead created as `root` then the `tar` command below will
68-
# fail: `can't create directory 'packages/': Permission denied`.
69-
# If this occurs, then ensure BuildKit is enabled (`DOCKER_BUILDKIT=1`)
70-
# so the app dir is correctly created as `node`.
7164
WORKDIR /app
7265

7366
# Copy the install dependencies from the build stage and context

package.json

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@
1919
"test:all": "backstage-cli repo test --coverage",
2020
"test:e2e": "playwright test",
2121
"fix": "backstage-cli repo fix",
22-
"lint": "backstage-cli repo lint --since origin/main",
22+
"lint": "backstage-cli repo lint --since origin/master",
2323
"lint:all": "backstage-cli repo lint",
2424
"prettier:check": "prettier --check .",
25-
"new": "backstage-cli new --scope internal"
25+
"new": "backstage-cli new --scope internal",
26+
"knip": "knip",
27+
"prepare": "husky",
28+
"postinstall": "husky || true"
2629
},
2730
"workspaces": {
2831
"packages": [
@@ -31,14 +34,21 @@
3134
]
3235
},
3336
"devDependencies": {
34-
"@backstage/cli": "^0.27.0",
37+
"@backstage/cli": "^0.27.1-next.1",
3538
"@backstage/e2e-test-utils": "^0.1.1",
3639
"@playwright/test": "^1.32.3",
37-
"@spotify/prettier-config": "^12.0.0",
40+
"@spotify/prettier-config": "^15.0.0",
41+
"@types/lodash": "^4.14.202",
42+
"@types/node": "^20.10.5",
3843
"concurrently": "^8.0.0",
39-
"lerna": "^7.3.0",
40-
"node-gyp": "^10.0.0",
41-
"prettier": "^2.3.2",
44+
"eslint": "^8.6.0",
45+
"fs-extra": "11.2.0",
46+
"husky": "^9.0.0",
47+
"jest": "^29.7.0",
48+
"knip": "^5.0.0",
49+
"lint-staged": "^15.0.0",
50+
"node-fetch": "^2.6.7",
51+
"prettier": "^3.0.0",
4252
"typescript": "~5.4.0"
4353
},
4454
"resolutions": {

0 commit comments

Comments
 (0)