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

Fix broken web deploy #1216

Merged
merged 14 commits into from
Jan 24, 2025
Merged
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.idea/
.git/
.github/
.direnv
node_modules/
.DS_Store
.dockerignore
23 changes: 6 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Misc
.DS_Store
*.pem
tsconfig.tsbuildinfo
.direnv/

# Dependencies
node_modules
.pnpm
.pnp
.pnp.js

# Local env files
.env
@@ -19,23 +24,7 @@ coverage
# Turbo
.turbo

# Vercel
.vercel

# Build Outputs
.next/
out/
build
dist


# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
.DS_Store
*.pem
tsconfig.tsbuildinfo
.direnv/
1 change: 1 addition & 0 deletions .idea/tailwindcss.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ enable-modules-dir = true
; Or you can set the virtual store to .pnpm and add it to .gitignore. This will
; make stacktraces cleaner as paths to dependencies will be one directory higher.
; default to `node_modules/.pnpm`
virtual-store-dir = .pnpm
virtual-store-dir = node_modules/.pnpm

; default to `auto`
package-import-method = auto
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23
23.6
2 changes: 1 addition & 1 deletion apps/web/.development.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NODE_ENV=development
NODE_OPTIONS="--trace-warnings --inspect --experimental-strip-types --experimental-transform-types --watch-preserve-output"
NODE_OPTIONS="--trace-warnings --inspect --experimental-transform-types --watch-preserve-output"
77 changes: 18 additions & 59 deletions apps/web/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,53 +1,34 @@
### macOS template
# General
.DS_Store

### Git
.gitignore
.git/

### Docker
.dockerignore
Dockerfile

### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
coverage/
*.lcov


# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/


# TypeScript cache
*.tsbuildinfo


# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.example
@@ -57,22 +38,6 @@ node_modules/
.env.local


# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*


### Remix template
node_modules
/.cache
/build
/public/build
.react-router


### Application
web.iml
README.md
@@ -81,15 +46,9 @@ fly.review.yaml
docker-image-stages.md
biome.json

### macOS template
# General
.DS_Store


### Docker
.dockerignore
Dockerfile

### Git
.gitignore
.git/
### Remix template
/.cache
/build
/public/build
.react-router
4 changes: 2 additions & 2 deletions apps/web/Dockerfile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL3018> reported by reviewdog 🐶
Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>

RUN apk add --no-cache jq

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <SC2046> reported by reviewdog 🐶
Quote this to prevent word splitting.

RUN corepack enable \

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [hadolint] <DL3059> reported by reviewdog 🐶
Multiple consecutive RUN instructions. Consider consolidation.

RUN pnpm dlx turbo prune --docker "@suddenlygiovanni/web"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <SC2164> reported by reviewdog 🐶
Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

RUN cd ./apps/web

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL3003> reported by reviewdog 🐶
Use WORKDIR to switch to a directory

RUN cd ./apps/web

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [hadolint] <DL3059> reported by reviewdog 🐶
Multiple consecutive RUN instructions. Consider consolidation.

RUN pnpm --filter @suddenlygiovanni/web --prod --no-optional deploy pruned

Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ RUN apk add --no-cache jq
RUN jq -r .packageManager package.json > pnpm-version.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [hadolint] <DL3059> reported by reviewdog 🐶
Multiple consecutive RUN instructions. Consider consolidation.



FROM node:current-alpine3.21 AS base
FROM node:23.6-alpine3.21 AS base

LABEL authors="suddenlyGiovanni"

@@ -84,4 +84,4 @@ USER node

EXPOSE 5173

CMD ["node", "--experimental-strip-types", "--experimental-transform-types", "server/server.ts"]
CMD ["node", "--experimental-transform-types", "server/server.ts"]
10 changes: 5 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
"description": "suddenlyGiovanni personal website monorepo",
"devDependencies": {
"@biomejs/biome": "nightly",
"@tailwindcss/language-server": "0.14.1",
"eslint": "9.18.0",
"scripty": "2.1.1",
"turbo": "2.3.3",
@@ -19,16 +20,12 @@
"packageManager": "[email protected]+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0",
"pnpm": {
"peerDependencyRules": {
"allowedVersions": {
"@react-router/[email protected]>vite": "^6",
"@vitest/[email protected]>vite": "^6"
}
"allowedVersions": {}
},
"overrides": {
"react": "^19.0.0",
"react-dom": "19.0.0",
"@types/react": "^19.0.0",
"vite": "^6"
"react-dom": "^19.0.0",
"@types/react": "^19.0.0"
}
},
"private": true,
32 changes: 11 additions & 21 deletions packages/ui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
import type { StorybookConfig } from '@storybook/react-vite'

// biome-ignore lint/correctness/noNodejsModules: <explanation>
import { dirname, join } from 'node:path'
const defineConfig = (config: StorybookConfig): StorybookConfig => config

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')))
}
const config: StorybookConfig = {
export default defineConfig({
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
getAbsolutePath('@storybook/addon-onboarding'),
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@chromatic-com/storybook'),
getAbsolutePath('@storybook/addon-interactions'),
getAbsolutePath('@storybook/addon-themes'),
getAbsolutePath('@storybook/addon-a11y'),
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
'@storybook/addon-themes',
'@storybook/addon-a11y',
],
framework: {
name: getAbsolutePath('@storybook/react-vite') as '@storybook/react-vite',
name: '@storybook/react-vite',
options: {
strictMode: true,
},
@@ -35,6 +27,4 @@ const config: StorybookConfig = {
typescript: {
reactDocgen: 'react-docgen-typescript',
},
}

export default config
})
Loading
Loading