Skip to content
Merged
Show file tree
Hide file tree
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
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

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/

RUN bun install

COPY . .

# Installing with full context. Prevent missing dependencies error.
RUN bun install


RUN bun run build

ENV NODE_ENV=production

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

EXPOSE 3000

CMD ["bun", "run", "start", "--host", "0.0.0.0"]
19 changes: 18 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,27 @@ services:
image: hiett/serverless-redis-http:latest
environment:
SRH_MODE: env
SRH_TOKEN: upstash-local-token
SRH_TOKEN: ${REDIS_TOKEN}
SRH_CONNECTION_STRING: "redis://valkey:6379"
ports:
- 8079:80

app:
container_name: zerodotemail-app
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000
depends_on:
- db
- valkey
- upstash-proxy
environment:
NODE_ENV: production
NODE_OPTIONS: --no-experimental-fetch
DATABASE_URL: ${DATABASE_URL}
REDIS_URL: ${REDIS_URL}

volumes:
valkey-data:
Expand Down