Skip to content

Commit

Permalink
Attempt to improve image size
Browse files Browse the repository at this point in the history
  • Loading branch information
tbantle22 committed Nov 3, 2023
1 parent adb0bd1 commit 2d30cd5
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 24 deletions.
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
**/.eslintcache
**/dist
**/*.tsbuildinfo
# packages/*/yarn.lock
packages/*/yarn.lock
packages/*/.rts2_cache*
WebDockerfile
GraphQLDockerfile
*.env
Dockerfile

.yarn/*
!.yarn/patches
Expand Down
9 changes: 5 additions & 4 deletions GraphQLDockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM --platform=linux/arm64/v8 node:18.18.0 as builder

ENV YARN_VERSION=3.6.1

RUN mkdir build
WORKDIR build

COPY . .
COPY ./packages/graphql-server/package.json .
RUN yarn install

WORKDIR packages/graphql-server
RUN yarn install --frozen-lockfile
COPY ./packages/graphql-server .
RUN yarn build

FROM --platform=linux/arm64/v8 node:18.18.0-alpine3.18
Expand All @@ -15,7 +17,6 @@ RUN mkdir -p /usr/dolt-workbench
WORKDIR /usr/dolt-workbench
COPY --from=builder /build/. .

WORKDIR /usr/dolt-workbench/packages/graphql-server
ENV NODE_ENV development
EXPOSE 9002
CMD [ "npm", "start" ]
7 changes: 3 additions & 4 deletions WebDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ FROM --platform=linux/arm64/v8 node:18.18.0 as builder
RUN mkdir build
WORKDIR build

COPY . .
COPY ./packages/web/package.json .
RUN yarn install

WORKDIR packages/web
RUN yarn install --frozen-lockfile
COPY ./packages/web .
RUN yarn build

FROM --platform=linux/arm64/v8 node:18.18.0-alpine3.18
Expand All @@ -15,7 +15,6 @@ RUN mkdir -p /usr/dolt-workbench
WORKDIR /usr/dolt-workbench
COPY --from=builder /build/. .

WORKDIR /usr/dolt-workbench/packages/web
ENV NODE_ENV=production
EXPOSE 3000
CMD [ "npm", "start" ]
8 changes: 7 additions & 1 deletion packages/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
}

module.exports = nextConfig
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
"@types/react-copy-to-clipboard": "^5.0.6",
"@types/react-dom": "^18.2.14",
"@types/react-infinite-scroller": "^1.2.3",
"@types/react-loader": "^2.4.7",
"@types/react-timeago": "^4.1.4",
"@types/testing-library__jest-dom": "^6.0.0",
"autoprefixer": "^10.4.16",
"babel-jest": "^29.7.0",
"cssnano": "^6.0.1",
Expand Down
14 changes: 13 additions & 1 deletion packages/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": [
"next-env.d.ts",
"**/*.ts",
Expand All @@ -12,6 +11,19 @@
"incremental": true,
"types": ["node"],
"baseUrl": ".",
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"paths": {
"@components/*": [
"components/*"
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1624,8 +1624,8 @@ __metadata:
"@types/react-copy-to-clipboard": ^5.0.6
"@types/react-dom": ^18.2.14
"@types/react-infinite-scroller": ^1.2.3
"@types/react-loader": ^2.4.7
"@types/react-timeago": ^4.1.4
"@types/testing-library__jest-dom": ^6.0.0
ace-builds: ^1.28.0
apollo-upload-client: ^17.0.0
autoprefixer: ^10.4.16
Expand Down Expand Up @@ -3678,7 +3678,7 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/jest-dom@npm:*, @testing-library/jest-dom@npm:^6.1.4":
"@testing-library/jest-dom@npm:^6.1.4":
version: 6.1.4
resolution: "@testing-library/jest-dom@npm:6.1.4"
dependencies:
Expand Down Expand Up @@ -4444,6 +4444,15 @@ __metadata:
languageName: node
linkType: hard

"@types/react-loader@npm:^2.4.7":
version: 2.4.7
resolution: "@types/react-loader@npm:2.4.7"
dependencies:
"@types/react": "*"
checksum: 5c9e92163ca733bf6c0dc1ece7bf9904908c2ee14892760410ec81d60eadbcbc10cc113eaa367398b0259ba3ee4a2879176d99ba6342669f77c1f5d539f793fd
languageName: node
linkType: hard

"@types/react-timeago@npm:^4.1.4":
version: 4.1.4
resolution: "@types/react-timeago@npm:4.1.4"
Expand Down Expand Up @@ -4522,15 +4531,6 @@ __metadata:
languageName: node
linkType: hard

"@types/testing-library__jest-dom@npm:^6.0.0":
version: 6.0.0
resolution: "@types/testing-library__jest-dom@npm:6.0.0"
dependencies:
"@testing-library/jest-dom": "*"
checksum: 1b4db1aa3c4225524203b4d1c3b36c7129e9d1e0547e46d2e5283c3ece226a3c16f5f20387cc71b33ab0eecd99d0cf91111bb327e8adb240388d99fb94af7a4d
languageName: node
linkType: hard

"@types/tough-cookie@npm:*":
version: 4.0.3
resolution: "@types/tough-cookie@npm:4.0.3"
Expand Down

0 comments on commit 2d30cd5

Please sign in to comment.