Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
cb1b219
early access generate
nizzyabi Mar 25, 2025
643c61d
up to date
nizzyabi Mar 31, 2025
9061fad
commit
nizzyabi Apr 1, 2025
5ffabfd
staging to main
nizzyabi Apr 2, 2025
73d22bd
make manual signups easier
nizzyabi Apr 2, 2025
588ab02
add: add dockerfile
Muhammad-Owais-Warsi Apr 5, 2025
1347a8e
Merge branch 'Mail-0:staging' into add/dockerfile
Muhammad-Owais-Warsi Apr 7, 2025
373423b
add: docker-compose.yaml
Muhammad-Owais-Warsi Apr 7, 2025
cd8833b
Merge branch 'add/dockerfile' of https://github.com/Muhammad-Owais-Wa…
Muhammad-Owais-Warsi Apr 7, 2025
49acc64
cleanup
hiheyhello123 Apr 8, 2025
8dba8a9
cleanup
hiheyhello123 Apr 8, 2025
7dd0fcd
Merge branch 'hotkeys' of github.com:Mail-0/Zero into new-keybinds
ahmetskilinc Apr 9, 2025
0d4be12
update dockerfile.
Muhammad-Owais-Warsi Apr 9, 2025
e35bd3f
Merge branch 'Mail-0:main' into add/dockerfile
Muhammad-Owais-Warsi Apr 9, 2025
d1bcb68
- switched to react-hotkeys-hook
ahmetskilinc Apr 9, 2025
f9f16db
add: docker-compose.yaml
Muhammad-Owais-Warsi Apr 9, 2025
e730552
Merge branch 'staging' into add/dockerfile
Muhammad-Owais-Warsi Apr 9, 2025
85e8fbf
Merge branch 'staging' of https://github.com/mail-0/zero into new-key…
hiheyhello123 Apr 10, 2025
dd9f236
feat: add farsi support
essinn Apr 10, 2025
2398a61
Merge branch 'main' into feature/language-support-fa
MrgSub Apr 11, 2025
93eb1d2
Merge branch 'staging' of https://github.com/mail-0/zero into new-key…
hiheyhello123 Apr 11, 2025
814fc48
Merge branch 'staging' of https://github.com/mail-0/zero into new-key…
hiheyhello123 Apr 11, 2025
749cabc
Merge branch 'staging' of https://github.com/mail-0/zero into new-key…
hiheyhello123 Apr 11, 2025
4d51e20
Merge branch 'main' into feature/language-support-fa
nizzyabi Apr 11, 2025
d3c72b5
hotkeys
hiheyhello123 Apr 12, 2025
972ddd0
Merge branch 'staging' of github.com:Mail-0/Zero into new-keybinds
ahmetskilinc Apr 12, 2025
4ee76c3
feat: save hotkeys to indexedDB
ahmetskilinc Apr 12, 2025
38d85e4
remove console logs from shortcuts
ahmetskilinc Apr 12, 2025
8f687d7
fix: load all shortcuts by default
ahmetskilinc Apr 12, 2025
458b065
fix: add key for selectAll in en.json
ahmetskilinc Apr 12, 2025
640efee
staging
nizzyabi Apr 12, 2025
8a0a833
hotkeys db and api route
ahmetskilinc Apr 13, 2025
ca1bc22
fix hotkeys db loading too many times
ahmetskilinc Apr 13, 2025
a864044
remove comments
ahmetskilinc Apr 13, 2025
03106ce
feat: update fa.json to empty string and add farsi to i18n.json
essinn Apr 14, 2025
b73d3be
Merge branch 'feature/language-support-fa' of https://github.com/essi…
essinn Apr 14, 2025
02c0c99
grant early access to anyone
nizzyabi Apr 14, 2025
a71f0c4
Merge branch 'main' of github.com:Mail-0/Zero into new-keybinds
ahmetskilinc Apr 14, 2025
9e22918
fix: remove unused imports
ahmetskilinc Apr 14, 2025
db58b12
fix: better handling of indexdb and syncing with postgres db
ahmetskilinc Apr 14, 2025
9313985
remove comments from hotkeys files
ahmetskilinc Apr 14, 2025
7725a50
fucking changes
nizzyabi Apr 15, 2025
fd056ff
changes
nizzyabi Apr 15, 2025
14dfeed
Merge branch 'main' into new-keybinds
MrgSub Apr 17, 2025
2bdcd8d
Refactor email creation component imports and structure
MrgSub Apr 17, 2025
cffc4f6
Merge pull request #649 from Mail-0/new-keybinds
MrgSub Apr 17, 2025
870dca9
Merge branch 'staging' into feature/language-support-fa
MrgSub Apr 17, 2025
32a698d
Merge pull request #636 from essinn/feature/language-support-fa
MrgSub Apr 17, 2025
576cc73
Merge branch 'staging' into add/dockerfile
MrgSub Apr 17, 2025
c82605a
Merge pull request #591 from Muhammad-Owais-Warsi/add/dockerfile
MrgSub Apr 17, 2025
f3f04fc
merge
nizzyabi Apr 17, 2025
45dca02
h
nizzyabi Apr 17, 2025
a0ef4d8
ealy acess new format
nizzyabi Apr 19, 2025
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
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM oven/bun:canary
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider using a stable Bun version rather than canary

Using the oven/bun:canary tag could introduce instability in production as it might include experimental features that change frequently.

-FROM oven/bun:canary
+FROM oven/bun:1.0.22
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
FROM oven/bun:canary
FROM oven/bun:1.0.22


WORKDIR /app

# Install turbo globally
RUN bun install -g next turbo


COPY package.json bun.lock turbo.json ./

RUN mkdir -p apps packages

COPY apps/*/package.json ./apps/
COPY packages/*/package.json ./packages/
COPY packages/tsconfig/ ./packages/tsconfig/
Comment on lines +13 to +15
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Directory structure may not be preserved correctly

The current approach for copying package.json files doesn't preserve the directory structure, which could cause build issues.

-COPY apps/*/package.json ./apps/
-COPY packages/*/package.json ./packages/
-COPY packages/tsconfig/ ./packages/tsconfig/
+COPY apps/mail/package.json ./apps/mail/
+COPY packages/*/package.json ./packages/
+COPY packages/tsconfig/ ./packages/tsconfig/

You should include copies for each specific subdirectory under apps/ to ensure the directory structure is maintained correctly.

Committable suggestion skipped: line range outside the PR's diff.


RUN bun install

COPY . .

# Installing with full context. Prevent missing dependencies error.
RUN bun install
Comment on lines +17 to +22
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Redundant dependency installation

Installing dependencies twice is inefficient and increases build time and image size unnecessarily.

-RUN bun install
-
-COPY . .
-
-# Installing with full context. Prevent missing dependencies error. 
-RUN bun install
+# Copy necessary files for dependency installation
+COPY apps/mail/package.json ./apps/mail/
+COPY packages/*/package.json ./packages/
+COPY packages/tsconfig/ ./packages/tsconfig/
+COPY turbo.json ./
+
+# Install dependencies
+RUN bun install --frozen-lockfile
+
+# Copy the rest of the application
+COPY . .
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
RUN bun install
COPY . .
# Installing with full context. Prevent missing dependencies error.
RUN bun install
# Copy necessary files for dependency installation
COPY apps/mail/package.json ./apps/mail/
COPY packages/*/package.json ./packages/
COPY packages/tsconfig/ ./packages/tsconfig/
COPY turbo.json ./
# Install dependencies
RUN bun install --frozen-lockfile
# Copy the rest of the application
COPY . .



RUN bun run build

ENV NODE_ENV=production

# Resolve Nextjs TextEncoder error.
ENV NODE_OPTIONS=--no-experimental-fetch
Comment on lines +29 to +30
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify if NODE_OPTIONS override is still necessary

The comment indicates this is addressing a TextEncoder error, but it's worth verifying if this is still required with the current versions of Next.js and Bun.


🌐 Web query:

Is the --no-experimental-fetch flag still required for Next.js with Bun in 2024?

💡 Result:

As of 2024, the --no-experimental-fetch flag is not required when running Next.js with Bun.

Key points:

  • Bun provides a stable, built-in fetch API. Unlike Node.js (which only stabilized fetch in v21 and had it as an experimental feature in v18-v20), Bun has shipped stable, browser-compatible fetch support for some time. You can use fetch in Bun without any flags or experimental options[5][8].
  • No mention in official Bun + Next.js guides. The official Bun guide for running Next.js makes no reference to --no-experimental-fetch—or any fetch-related flags—when using Bun as the runtime. You simply use bun --bun run dev to start your app, and fetch "just works"[6].
  • --no-experimental-fetch is a Node.js-specific flag. This flag controls whether the global fetch API is available in Node.js versions where fetch was experimental. It has no effect or relevance in Bun, as Bun implements fetch natively and non-experimentally[2][5].
  • Recent Bun and Next.js updates have continued to improve Node.js compatibility and stability, but none have made the use of --no-experimental-fetch necessary or even valid on Bun[3][6].

Summary Table

Runtime fetch availability Need for --no-experimental-fetch
Node.js Experimental in v18–20, Stable in v21+ Sometimes (in v18–20)
Bun Stable, built-in Never

Conclusion:
If you are running Next.js with Bun in 2024, you do not need—and should not use—the --no-experimental-fetch flag. Just use fetch as you normally would[6][8].

Citations:


🏁 Script executed:

#!/bin/bash
# Display the first 50 lines of Dockerfile to inspect the base image and context
sed -n '1,50p' Dockerfile

Length of output: 607


Remove unneeded --no-experimental-fetch flag in Dockerfile

The --no-experimental-fetch option is Node.js‑specific and has no effect in Bun (which provides a stable, built‑in fetch). You can safely remove this override.

• File: Dockerfile, around line 29
• Change:

-  # Resolve Nextjs TextEncoder error.
-  ENV NODE_OPTIONS=--no-experimental-fetch
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Resolve Nextjs TextEncoder error.
ENV NODE_OPTIONS=--no-experimental-fetch


EXPOSE 3000

CMD ["bun", "run", "start", "--host", "0.0.0.0"]
Comment on lines +32 to +34
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Missing health check and user configuration

The Dockerfile lacks a health check and runs as root by default, which is not recommended for production containers.

EXPOSE 3000
+
+# Add a health check
+HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
+  CMD curl -f http://localhost:3000/api/health || exit 1
+
+# Create a non-root user
+RUN adduser --disabled-password --gecos "" appuser
+USER appuser

CMD ["bun", "run", "start", "--host", "0.0.0.0"]

Committable suggestion skipped: line range outside the PR's diff.

1 change: 1 addition & 0 deletions apps/mail/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ REDIS_TOKEN="upstash-local-token"

# Resend API Key
RESEND_API_KEY=
RESEND_AUDIENCE_ID=

# OpenAI API Key
OPENAI_API_KEY=
Expand Down
1 change: 1 addition & 0 deletions apps/mail/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

output.json
# dependencies
/node_modules
/.pnp
Expand Down
Loading