You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add instructions on building docker image to readme (#265)
* Add instructions on building docker image
Following the same method given in NextJs examples
* fix: prettier check
run prettier format to fix formatting issues
Copy file name to clipboardExpand all lines: template/base/README.md
+80
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,86 @@ We recommend deploying to [Vercel](https://vercel.com/?utm_source=t3-oss&utm_cam
30
30
- Click **Deploy**
31
31
- Now whenever you push a change to your repository, Vercel will automatically redeploy your website!
32
32
33
+
You can also dockerize this stack and deploy a container.
34
+
35
+
- In your next.config.mjs, add the `output: "standalone"` option to your config.
36
+
- Create a `.dockerignore` file with the following contents:
37
+
```
38
+
Dockerfile
39
+
.dockerignore
40
+
node_modules
41
+
npm-debug.log
42
+
README.md
43
+
.next
44
+
.git
45
+
```
46
+
- Create a `Dockerfile` with the following contents:
47
+
48
+
```
49
+
# Install dependencies only when needed
50
+
FROM node:16-alpine AS deps
51
+
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
52
+
RUN apk add --no-cache libc6-compat
53
+
WORKDIR /app
54
+
55
+
# Install dependencies based on the preferred package manager
- You can now build an image to deploy yourself, or use a PaaS such as [Railway's](https://railway.app) automated [Dockerfile deployments](https://docs.railway.app/deploy/dockerfiles) to deploy your app.
112
+
33
113
## Useful resources
34
114
35
115
Here are some resources that we commonly refer to:
0 commit comments