Skip to content

Commit e4ba4b5

Browse files
committed
docs: translate docker.md to german
1 parent bbb0859 commit e4ba4b5

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

www/src/pages/de/deployment/docker.md

+44-44
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
22
title: Docker
3-
description: Deployment with Docker
3+
description: Bereitstellung mit Docker
44
layout: ../../../layouts/docs.astro
5-
lang: en
5+
lang: de
66
---
77

8-
You can containerize this stack and deploy it as a single container using Docker, or as a part of a group of containers using docker-compose. See [`ajcwebdev/ct3a-docker`](https://github.com/ajcwebdev/ct3a-docker) for an example repo based on this doc.
8+
Der Stack kann mit Docker bereitgestellt werden. Entweder als einzelner Container oder als Gruppe von Containern mit `docker-compose`. Ein Beispiel lässt sich in dem Repository [`ajcwebdev/ct3a-docker`](https://github.com/ajcwebdev/ct3a-docker) finden, welches auf dieser Dokumentation basiert.
99

10-
## Docker Project Configuration
10+
## Docker Projekt Konfiguration
1111

12-
Please note that Next.js requires a different process for build time (available in the frontend, prefixed by `NEXT_PUBLIC`) and runtime environment, server-side only, variables. In this demo we are using two variables, pay attention to their positions in the `Dockerfile`, command-line arguments, and `docker-compose.yml`:
12+
Next.js benötigt unterschiedliche Vorgehensweisen für Variablen, die zur "Build time" gesetzt werden (verfügbar im Frontend, gepräfixt durch `NEXT_PUBLIC`) und Variablen, die nur serverseitig verfügbar sein sollen. Bitte beachte also die Anordnung der Variablen in der Befehlszeile, der `Dockerfile` und der `docker-compose.yml` Datei.
1313

14-
- `DATABASE_URL` (used by the server)
15-
- `NEXT_PUBLIC_CLIENTVAR` (used by the client)
14+
- `DATABASE_URL` (wird vom Server verwendet)
15+
- `NEXT_PUBLIC_CLIENTVAR` (wird vom Client verwendet)
1616

17-
### 1. Next Configuration
17+
### 1. Next.js Konfiguration
1818

19-
In your [`next.config.mjs`](https://github.com/t3-oss/create-t3-app/blob/main/cli/template/base/next.config.mjs), add the `standalone` output-option configuration to [reduce image size by automatically leveraging output traces](https://nextjs.org/docs/advanced-features/output-file-tracing):
19+
In der [`next.config.mjs`](https://github.com/t3-oss/create-t3-app/blob/main/cli/template/base/next.config.mjs), muss die output-Option auf `standalone` gesetzt werden, um die Größe vom Docker-Image zu reduzieren und Gebrauch von ["Output File Tracing"](https://nextjs.org/docs/advanced-features/output-file-tracing) zu machen:
2020

2121
```diff
2222
export default defineNextConfig({
@@ -26,11 +26,11 @@ export default defineNextConfig({
2626
});
2727
```
2828

29-
### 2. Create dockerignore file
29+
### 2. Erstelle eine dockerignore Datei
3030

3131
<details>
3232
<summary>
33-
Click here and include contents in <code>.dockerignore</code>:
33+
Klick hier und kopiere den Inhalt in <code>.dockerignore</code>:
3434
</summary>
3535
<div class="content">
3636

@@ -49,28 +49,28 @@ README.md
4949

5050
</details>
5151

52-
### 3. Create Dockerfile
52+
### 3. Dockerfile erstellen
5353

54-
> Since we're not pulling the server environment variables into our container, the [environment schema validation](/en/usage/env-variables) will fail. To prevent this, we have to add a `SKIP_ENV_VALIDATION=1` flag to the build command so that the env-schemas aren't validated at build time.
54+
> Da wir die Umgebungsvariablen des Servers nicht in den Container ziehen, wird die [Validierung der Umgebungsvariablen](/de/usage/env-variables) fehlschlagen. Um dies zu verhindern, müssen wir dem Build-Befehl `SKIP_ENV_VALIDATION=1` hinzufügen, damit die Umgebungsvariablen-Schemas nicht zur "Build time" validiert werden.
5555
5656
<details>
5757
<summary>
58-
Click here and include contents in <code>Dockerfile</code>:
58+
Klick hier und kopiere den Inhalt in <code>Dockerfile</code>:
5959
</summary>
6060
<div class="content">
6161

6262
```docker
63-
##### DEPENDENCIES
63+
##### Abhängigkeiten
6464
6565
FROM --platform=linux/amd64 node:16-alpine AS deps
6666
RUN apk add --no-cache libc6-compat openssl
6767
WORKDIR /app
6868
69-
# Install Prisma Client - remove if not using Prisma
69+
# Installiere Prisma Client - Entferne diese Zeile wenn du Prisma nicht verwendest
7070
7171
COPY prisma ./
7272
73-
# Install dependencies based on the preferred package manager
73+
# Installiere die Abhängigkeiten basierend auf dem bevorzugten Paketmanager
7474
7575
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml\* ./
7676
@@ -126,33 +126,33 @@ CMD ["node", "server.js"]
126126
127127
```
128128

129-
> **_Notes_**
129+
> **_Notizen_**
130130
>
131-
> - _Emulation of `--platform=linux/amd64` may not be necessary after moving to Node 18._
132-
> - _See [`node:alpine`](https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine) to understand why `libc6-compat` might be needed._
133-
> - _Next.js collects [anonymous telemetry data about general usage](https://nextjs.org/telemetry). Uncomment the first instance of `ENV NEXT_TELEMETRY_DISABLED 1` to disable telemetry during the build. Uncomment the second instance to disable telemetry during runtime._
131+
> - _Emulation von `--platform=linux/amd64` ist gegebenfalls nicht mehr notwendig mit Node 18._
132+
> - _Siehe [`node:alpine`](https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine) um zu verstehen warum `libc6-compat` eventuell benötigt wird._
133+
> - _Next.js erfasst [anonyme Daten zur Nutzung](https://nextjs.org/telemetry). In der obenstehenden `Dockerfile` befinden sich bereits zwei auskommentierte Zeilen mit dem Befehl `ENV NEXT_TELEMETRY_DISABLED 1`. Entferne die Kommentare der ersten Zeile um die Datenerfassung während des Builds zu deaktivieren. Die zweite Zeile deaktiviert die Datenerfassung zur Laufzeit._
134134
135135
</div>
136136
</details>
137137

138-
## Build and Run Image Locally
138+
## Erstellung und lokale Ausführung des Images
139139

140-
Build and run this image locally with the following commands:
140+
Erstelle und starte das Image lokal mit folgenden Befehlen:
141141

142142
```bash
143143
docker build -t ct3a-docker --build-arg NEXT_PUBLIC_CLIENTVAR=clientvar .
144-
docker run -p 3000:3000 -e DATABASE_URL="database_url_goes_here" ct3a-docker
144+
docker run -p 3000:3000 -e DATABASE_URL="hier_datenbank_url_einfügen" ct3a-docker
145145
```
146146

147-
Open [localhost:3000](http://localhost:3000/) to see your running application.
147+
Öffne [localhost:3000](http://localhost:3000/) um die laufende Anwendung zu sehen.
148148

149149
## Docker Compose
150150

151-
You can also use Docker Compose to build the image and run the container.
151+
Du kannst auch Docker Compose verwenden, um deine Anwendung zu starten.
152152

153153
<details>
154154
<summary>
155-
Follow steps 1-4 above, click here, and include contents in <code>docker-compose.yml</code>:
155+
Verfolge die obenstehenden Schritte 1-4, klicke hier und füge den Inhalt in <code>docker-compose.yml</code> ein:
156156
</summary>
157157
<div class="content">
158158

@@ -171,23 +171,23 @@ services:
171171
- "3000:3000"
172172
image: t3-app
173173
environment:
174-
- DATABASE_URL=database_url_goes_here
174+
- DATABASE_URL=hier_datenbank_url_einfügen
175175
```
176176
177-
Run this using the `docker compose up` command:
177+
Führe den Befehl `docker compose up` aus:
178178

179179
```bash
180180
docker compose up
181181
```
182182

183-
Open [localhost:3000](http://localhost:3000/) to see your running application.
183+
Öffne [localhost:3000](http://localhost:3000/) um die laufende Anwendung zu sehen.
184184

185185
</div>
186186
</details>
187187

188-
## Deploy to Railway
188+
## Deploy nach Railway
189189

190-
You can use a PaaS such as [Railway's](https://railway.app) automated [Dockerfile deployments](https://docs.railway.app/deploy/dockerfiles) to deploy your app. If you have the [Railway CLI installed](https://docs.railway.app/develop/cli#install) you can deploy your app with the following commands:
190+
Du kannst einen PaaS wie [Railway's](https://railway.app) automatisierte [Dockerfile deployments](https://docs.railway.app/deploy/dockerfiles) verwenden um deine Anwendung zu deployen. Wenn du die [Railway CLI installiert hast](https://docs.railway.app/develop/cli#install) kannst du deine Anwendung mit folgenden Befehlen deployen:
191191

192192
```bash
193193
railway login
@@ -197,17 +197,17 @@ railway up
197197
railway open
198198
```
199199

200-
Go to "Variables" and include your `DATABASE_URL`. Then go to "Settings" and select "Generate Domain." To view a running example on Railway, visit [ct3a-docker.up.railway.app](https://ct3a-docker.up.railway.app/).
200+
Gehe zu "Variables" und füge deine `DATABASE_URL` ein. Anschließend gehe zu "Settings" und wähle "Generate Domain". Um ein laufendes Beispiel auf Railway zu sehen, besuche [ct3a-docker.up.railway.app](https://ct3a-docker.up.railway.app/).
201201

202-
## Useful Resources
202+
## Nützliche Ressourcen
203203

204-
| Resource | Link |
205-
| ------------------------------------ | -------------------------------------------------------------------- |
206-
| Dockerfile reference | https://docs.docker.com/engine/reference/builder/ |
207-
| Compose file version 3 reference | https://docs.docker.com/compose/compose-file/compose-file-v3/ |
208-
| Docker CLI reference | https://docs.docker.com/engine/reference/commandline/docker/ |
209-
| Docker Compose CLI reference | https://docs.docker.com/compose/reference/ |
210-
| Next.js Deployment with Docker Image | https://nextjs.org/docs/deployment#docker-image |
211-
| Next.js in Docker | https://benmarte.com/blog/nextjs-in-docker/ |
212-
| Next.js with Docker Example | https://github.com/vercel/next.js/tree/canary/examples/with-docker |
213-
| Create Docker Image of a Next.js app | https://blog.tericcabrel.com/create-docker-image-nextjs-application/ |
204+
| Resource | Link |
205+
| ----------------------------------------------- | -------------------------------------------------------------------- |
206+
| Dockerfile Referenz | https://docs.docker.com/engine/reference/builder/ |
207+
| Compose file version 3 Referenz | https://docs.docker.com/compose/compose-file/compose-file-v3/ |
208+
| Docker CLI Referenz | https://docs.docker.com/engine/reference/commandline/docker/ |
209+
| Docker Compose CLI Referenz | https://docs.docker.com/compose/reference/ |
210+
| Next.js Deployment mit Docker Image | https://nextjs.org/docs/deployment#docker-image |
211+
| Next.js in Docker | https://benmarte.com/blog/nextjs-in-docker/ |
212+
| Next.js mit Docker Beispiel | https://github.com/vercel/next.js/tree/canary/examples/with-docker |
213+
| Erstelle ein Docker Image von einer Next.js app | https://blog.tericcabrel.com/create-docker-image-nextjs-application/ |

0 commit comments

Comments
 (0)