Skip to content

Commit

Permalink
ci: fix review app
Browse files Browse the repository at this point in the history
  • Loading branch information
damassi committed Dec 10, 2024
1 parent 9b59d02 commit 19870a2
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 35 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ COPY --chown=deploy:deploy --from=builder-base /opt/node_modules.prod ./node_mod

# Base code
COPY --chown=deploy:deploy --from=builder-base /app/data ./data
COPY --chown=deploy:deploy --from=builder-base /app/dist ./dist
COPY --chown=deploy:deploy --from=builder-base /app/src ./src
COPY --chown=deploy:deploy --from=builder-base /app/scripts ./scripts
COPY --chown=deploy:deploy --from=builder-base /app/package.json .
COPY --chown=deploy:deploy --from=builder-base /app/yarn.lock .

# App artifacts
COPY --chown=deploy:deploy --from=builder-base /app/dist ./dist

ENTRYPOINT ["/usr/bin/dumb-init", "./scripts/load_secrets_and_run.sh"]

ENV NODE_PATH=/app/src

# TODO: Reduce production memory, this is not a concern
CMD ["node", "--max_old_space_size=2048", "--heapsnapshot-signal=SIGUSR2", "--no-experimental-fetch", "-r @swc-node/register", "./src/prod.ts"]
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"sync-env": "aws s3 cp s3://artsy-citadel/force/.env.shared ./ && echo 'ENV sync complete.'",
"start": "scripts/start.sh",
"start:prod": "yarn build && SESSION_LOCAL_INSECURE=true NODE_ENV=production yarn start",
"start:prod:debug": "SESSION_LOCAL_INSECURE=true NODE_ENV=production node --inspect --max_old_space_size=3072 -r @swc-node/register ./src/index.ts",
"start:prod:debug": "SESSION_LOCAL_INSECURE=true NODE_ENV=production NODE_PATH=src node --inspect --max_old_space_size=3072 -r @swc-node/register ./src/prod.ts",
"sync-schema": "scripts/sync-schema-pull.sh",
"sync-schema-local": "scripts/sync-schema-local.sh",
"test": "scripts/jest.sh",
Expand All @@ -64,6 +64,8 @@
"@types/react-dom": "^18.3.1",
"@types/react-relay": "^16.0.6",
"@types/relay-runtime": "18.1.1",
"graceful-fs": "4.x.x",
"regenerator-runtime": "0.13.5",
"styled-components": "^6.1.13"
},
"dependencies": {
Expand All @@ -90,6 +92,7 @@
"@stripe/stripe-js": "^4.1.0",
"@styled-system/theme-get": "5.1.2",
"@swc-node/register": "^1.10.9",
"@swc/helpers": "^0.5.15",
"actioncable": "^5.2.7-1",
"analytics-node": "2.4.1",
"async": "^3.2.4",
Expand Down
2 changes: 1 addition & 1 deletion rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default defineConfig({
writeToDisk: true,
},
performance: {
// FIXME: Uncomment and play around with different bundle split strategies,
// TODO: Uncomment and play around with different bundle split strategies,
// along with stats below:
// chunkSplit: {
// strategy: "split-by-size",
Expand Down
3 changes: 2 additions & 1 deletion scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ if [ "${NODE_ENV}" != "production" ]; then
fi
# Prod
else
exec node "${OPT[@]}" --no-experimental-fetch -r @swc-node/register ./src/prod.ts
export NODE_PATH=src
exec node "${OPT[@]}" --no-experimental-fetch -r @swc-node/register ./src/prod.ts
fi
6 changes: 4 additions & 2 deletions scripts/uploadToS3.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const s3 = require("s3")
const { last } = require("lodash")

const options = {
root: "public",
files: path.join(__dirname, "../dist/**"),
root: "dist",
files: path.join(process.cwd(), "./dist/**"),
key: process.env.S3_KEY,
secret: process.env.S3_SECRET,
bucket: process.env.S3_BUCKET,
Expand All @@ -30,6 +30,8 @@ const files = glob.sync(options.files, {
nodir: true,
})

console.log(files)

const generateHeaders = file => {
const extension = path.extname(file)
const contentType = mime.getType(extension)
Expand Down
2 changes: 1 addition & 1 deletion src/Server/webpackPublicPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (process.env.NODE_ENV === "production") {
// webpack pathing client side.

// @ts-expect-error - webpack magic var
__webpack_public_path__ = cdnUrl + "/assets/"
__webpack_public_path__ = cdnUrl + "/"

// @ts-expect-error - webpack magic var
window.__getPublicPath = () => __webpack_public_path__
Expand Down
32 changes: 5 additions & 27 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8317,17 +8317,10 @@ got@^9.6.0:
to-readable-stream "^1.0.0"
url-parse-lax "^3.0.0"

graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
version "4.2.10"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==

graceful-fs@~3.0.5:
version "3.0.12"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.12.tgz#0034947ce9ed695ec8ab0b854bc919e82b1ffaef"
integrity sha512-J55gaCS4iTTJfTXIxSVw3EMQckcqkpdRv3IR7gu6sq0+tbC363Zx6KH/SEwXASK9JRbhyZmVjJEVJIOxYsB3Qg==
dependencies:
natives "^1.1.3"
[email protected], graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9, graceful-fs@~3.0.5:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==

graphql-tools@^4.0.2:
version "4.0.3"
Expand Down Expand Up @@ -11602,11 +11595,6 @@ nanomatch@^1.2.9:
snapdragon "^0.8.1"
to-regex "^3.0.1"

natives@^1.1.3:
version "1.1.6"
resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.6.tgz#a603b4a498ab77173612b9ea1acdec4d980f00bb"
integrity sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==

natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
Expand Down Expand Up @@ -13482,21 +13470,11 @@ reflect.getprototypeof@^1.0.4:
globalthis "^1.0.3"
which-builtin-type "^1.1.3"

regenerator-runtime@^0.11.0:
version "0.11.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==

regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4:
[email protected], regenerator-runtime@^0.11.0, regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4, regenerator-runtime@^0.14.0:
version "0.13.5"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697"
integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==

regenerator-runtime@^0.14.0:
version "0.14.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==

regex-not@^1.0.0, regex-not@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
Expand Down

0 comments on commit 19870a2

Please sign in to comment.