Skip to content

Commit

Permalink
feat: migrated from node to bun + created a docker image for the app
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbrusegard committed Jan 20, 2024
1 parent aa59f6a commit 9b561ea
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 6,557 deletions.
38 changes: 38 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# dependencies
/node_modules

# next.js
/.next/
/out/
next-env.d.ts

# production
/build

# misc
.DS_Store

# local env files
.env
.env*.local

# typescript
*.tsbuildinfo

# site map
public/sitemap.xml
public/robots.txt

# prettier
prettier.config.js

# docker
Dockerfile*
.dockerignore

# git
.git
.gitignore

# docs
README.md
19 changes: 0 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal

# next.js
/.next/
Expand All @@ -22,21 +13,11 @@ next-env.d.ts

# misc
.DS_Store
*.pem

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

# local env files
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo

Expand Down
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM oven/bun:1

WORKDIR /app

COPY package.json bun.lockb ./

RUN bun install --frozen-lockfile --production

COPY . .

RUN bun run build

EXPOSE 3000

ENTRYPOINT [ "bun", "start" ]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ Here is a list of documentation to help you get started:

## Development setup

Make sure you have Node.js installed on your machine. If you don't have it, you can download it [here](https://nodejs.org/en/download/).
Make sure you have Bun installed on your machine. If you don't have it, you can download it [here](https://bun.sh/docs/installation).

First, install dependencies:

```bash
npm install
bun install
```

Then, run the development server:

```bash
npm run dev
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Expand Down
Binary file added bun.lockb
Binary file not shown.
Loading

0 comments on commit 9b561ea

Please sign in to comment.