Skip to content

Feature/self hosters deployment #7458

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

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

iitzIrFan
Copy link
Contributor

What is it?

Resolves :- #5412

  • Feature / enhancement
  • Docs / tests / types / typos

Description

For a long time this issue was pending and thought of resolving it as per my best.
So I had created a new doc section, where I had mentioned about the following things,

  • Prerequisites,
  • Build options,
  • methods of deployment, server config,
  • CSRF protection guidelines & some practices

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

@iitzIrFan iitzIrFan requested review from a team as code owners March 26, 2025 15:22
Copy link

changeset-bot bot commented Mar 26, 2025

⚠️ No Changeset found

Latest commit: e08047e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Mar 26, 2025

Open in Stackblitz

npm i https://pkg.pr.new/@builder.io/qwik@7458
npm i https://pkg.pr.new/@builder.io/qwik-city@7458
npm i https://pkg.pr.new/eslint-plugin-qwik@7458
npm i https://pkg.pr.new/create-qwik@7458

commit: 93d66e0

Copy link
Contributor

github-actions bot commented Mar 26, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 93d66e0

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

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

Looking great! But some comments

<PackageManagerTabs>
<span q:slot="pnpm">
```shell
pnpm run qwik add express
Copy link
Member

Choose a reason for hiding this comment

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

all these commands should just be replaced with a single npx qwik add express

}

# Cache settings for immutable assets
location /build/ {
Copy link
Member

Choose a reason for hiding this comment

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

same

Copy link
Member

@wmertens wmertens May 6, 2025

Choose a reason for hiding this comment

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

still needs /assets handling here, and nginx also has gzip_static on; brotli_static on;

ProxyPassReverse / http://localhost:3000/

# Serve static assets directly
<Directory /path/to/your/app/dist/build>
Copy link
Member

Choose a reason for hiding this comment

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

same

- Use logging services like Winston or Pino for structured logs

3. Consider adding application monitoring with:
- Prometheus + Grafana for self-hosted monitoring
Copy link
Member

Choose a reason for hiding this comment

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

there's also netdata which is really nice

Copy link
Member

Choose a reason for hiding this comment

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

just leave these package.json changes for another PR. Keep only the docs change

@iitzIrFan iitzIrFan requested a review from wmertens April 28, 2025 19:54
@iitzIrFan
Copy link
Contributor Author

@wmertens Had made changes you can review my pr and update !

@iitzIrFan
Copy link
Contributor Author

@wmertens I was wondering how other developers are tackling this issue as I had encountered in development and had to figure out other ways to test before pushing my code 😕Screenshot_2025-04-29-02-56-24-105_com.android.chrome.png

@@ -3657,7 +3657,7 @@ Options for the prefetch service worker.
</tbody></table>
**Returns:**

[JSXNode](#jsxnode)&lt;'script'&gt;
JSXNode&lt;'script'&gt;
Copy link
Member

Choose a reason for hiding this comment

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

could you run pnpm api.update again please?

Copy link
Contributor Author

@iitzIrFan iitzIrFan May 8, 2025

Choose a reason for hiding this comment

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

@wmertens
This gives an error
`,"PS C:\asus irfan\Downloads\Qwik\qwik> pnpm api.update

[email protected] api.update C:\asus irfan\Downloads\Qwik\qwik
tsx --require ./scripts/runBefore.ts scripts/index.ts --tsc --api --dev

🌎 Qwik v1.12.1-dev+e08047e [node v20.19.1, win32/x64]
tsc qwik
packages/qwik/src/optimizer/src/plugins/eslint-plugin.ts:25:9 - error TS2353: Object literal may only specify known properties, and 'root' does not exist in type 'Config | Config[]'.

25 root: true,
~~~~
node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/types/index.d.ts:1966:3
1966 overrideConfig?: Linter.Config | Linter.Config[] | null | undefined;
~~~~~~~~~~~~~~
The expected type comes from property 'overrideConfig' which is declared here on type 'Options'

Found 1 error in packages/qwik/src/optimizer/src/plugins/eslint-plugin.ts:25

❌ Error: Command failed with exit code 2: tsc -p C:\asus irfan\Downloads\Qwik\qwik\packages\qwik\tsconfig.json
at makeError (file:///C:/asus%20irfan/Downloads/Qwik/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:60:11)
at handlePromise (file:///C:/asus%20irfan/Downloads/Qwik/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async tscQwik (C:\asus irfan\Downloads\Qwik\qwik\scripts\tsc.ts:8:18)
at async build (C:\asus irfan\Downloads\Qwik\qwik\scripts\build.ts:63:7)
Error: Error: Command failed with exit code 2: tsc -p C:\asus irfan\Downloads\Qwik\qwik\packages\qwik\tsconfig.json
at makeError (file:///C:/asus%20irfan/Downloads/Qwik/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:60:11)
at handlePromise (file:///C:/asus%20irfan/Downloads/Qwik/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async tscQwik (C:\asus irfan\Downloads\Qwik\qwik\scripts\tsc.ts:8:18)
at async build (C:\asus irfan\Downloads\Qwik\qwik\scripts\build.ts:63:7)
at panic (C:\asus irfan\Downloads\Qwik\qwik\scripts\util.ts:287:33)
at build (C:\asus irfan\Downloads\Qwik\qwik\scripts\build.ts:192:5)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
 ELIFECYCLE  Command failed with exit code 1."`

@wmertens
Copy link
Member

wmertens commented May 6, 2025

we're fixing the builder content issue, but you can always go directly to /docs

@iitzIrFan iitzIrFan requested a review from wmertens May 8, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants