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 (t3-oss#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
* docs: small adjustments
Copy file name to clipboardExpand all lines: template/base/README.md
+71-57
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ If you are not familiar with the different technologies used in this project, pl
21
21
22
22
## How do I deploy this?
23
23
24
+
### Vercel
25
+
24
26
We recommend deploying to [Vercel](https://vercel.com/?utm_source=t3-oss&utm_campaign=oss). It makes it super easy to deploy NextJs apps.
25
27
26
28
- Push your code to a GitHub repository.
@@ -30,85 +32,97 @@ We recommend deploying to [Vercel](https://vercel.com/?utm_source=t3-oss&utm_cam
30
32
- Click **Deploy**
31
33
- Now whenever you push a change to your repository, Vercel will automatically redeploy your website!
32
34
35
+
### Docker
36
+
33
37
You can also dockerize this stack and deploy a container.
34
38
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
1. In your [next.config.mjs](./next.config.mjs), add the `output: "standalone"` option to your config.
40
+
2. Create a `.dockerignore` file with the following contents:
41
+
<details>
42
+
<summary>.dockerignore</summary>
43
+
44
+
```
45
+
Dockerfile
46
+
.dockerignore
47
+
node_modules
48
+
npm-debug.log
49
+
README.md
50
+
.next
51
+
.git
52
+
```
53
+
54
+
</details>
55
+
56
+
3. Create a `Dockerfile` with the following contents:
57
+
<details>
58
+
<summary>Dockerfile</summary>
59
+
60
+
```Dockerfile
61
+
# Install dependencies only when needed
62
+
FROM node:16-alpine AS deps
63
+
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
64
+
RUN apk add --no-cache libc6-compat
65
+
WORKDIR /app
66
+
67
+
# 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.
125
+
4. 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.
0 commit comments