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
Copy file name to clipboardExpand all lines: articles/container-apps/quickstart-code-to-cloud.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,7 +144,7 @@ Download and extract the API sample application in the language of your choice.
144
144
145
145
# [C#](#tab/csharp)
146
146
147
-
[Download the source code](https://codeload.github.com/azure-samples/containerapps-albumapi-csharp/zip/refs/heads/main)from the [azure-samples/containerapps-albumapi-csharp repo](https://github.com/azure-samples/containerapps-albumapi-csharp).
147
+
[Download the source code](https://codeload.github.com/azure-samples/containerapps-albumapi-csharp/zip/refs/heads/main)to your machine.
148
148
149
149
Extract the download and change into the *containerapps-albumapi-csharp-main/src* folder.
150
150
@@ -155,9 +155,6 @@ Extract the download and change into the *containerapps-albumapi-csharp-main/src
155
155
156
156
Extract the download and change into the *containerapps-albumapi-java-main/src* folder.
157
157
158
-
> [!NOTE]
159
-
> The Java sample only supports a Maven build, which creates an executable JAR file. The build uses the default settings, as passing in environment variables is not supported.
160
-
161
158
162
159
# [JavaScript](#tab/javascript)
163
160
@@ -175,9 +172,9 @@ Extract the download and change into the *containerapps-albumapi-python-main/src
175
172
176
173
# [Go](#tab/go)
177
174
178
-
[Download the source code](https://codeload.github.com/azure-samples/containerapps-albumapi-go/zip/refs/heads/main)from the [azure-samples/containerapps-albumapi-csharp repo](https://github.com/azure-samples/containerapps-albumapi-go).
175
+
[Download the source code](https://codeload.github.com/azure-samples/containerapps-albumapi-go/zip/refs/heads/main)to your machine.
179
176
180
-
Extract the download and navigate into the `containerapps-albumapi-go-main/src` directory and proceed to the next step.
177
+
Extract the download and navigate into the *containerapps-albumapi-go-main/src* folder.
181
178
182
179
183
180
::: zone-end
@@ -217,7 +214,7 @@ Extract the download and navigate into the `containerapps-albumapi-python-buildp
217
214
218
215
# [Go](#tab/go)
219
216
220
-
Azure Container Apps cloud build doesn't support Buildpacks for Go.
217
+
Azure Container Apps cloud build doesn't currently support Buildpacks for Go.
221
218
222
219
::: zone-end
223
220
@@ -230,19 +227,22 @@ Azure Container Apps cloud build doesn't support Buildpacks for Go.
230
227
231
228
Build and deploy your first container app with the `containerapp up` command. This command will:
232
229
233
-
- Create the resource group
234
230
::: zone pivot="with-dockerfile"
231
+
- Create the resource group
235
232
- Create an Azure Container Registry
236
233
- Build the container image and push it to the registry
234
+
- Create the Container Apps environment with a Log Analytics workspace
235
+
- Create and deploy the container app using the built container image
237
236
::: zone-end
237
+
238
238
::: zone pivot="without-dockerfile"
239
-
-Automatically create a default registry as part of your environment
240
-
-Automatically detect the language and runtime
241
-
-Build the image using the appropriate Buildpack
239
+
-Create the resource group
240
+
-Create a default registry as part of your environment
241
+
-Detect the language and runtime of your application and build the image using the appropuiate Buildpack
242
242
- Push the image into the Azure Container Apps default registry
243
-
::: zone-end
244
243
- Create the Container Apps environment with a Log Analytics workspace
245
-
- Create and deploy the container app using the build container image
244
+
- Create and deploy the container app using the built container image
245
+
::: zone-end
246
246
247
247
::: zone pivot="with-dockerfile"
248
248
@@ -251,7 +251,7 @@ The `up` command uses the Dockerfile in the root of the repository to build the
251
251
::: zone-end
252
252
::: zone pivot="without-dockerfile"
253
253
254
-
If the `up` command doesn't find a Dockerfile, it automatically uses Buildpacks to turn your application source into a runnable container. Since the Buildpack is trying to run the build on your behalf, you need to tell the `up` command which port to use.
254
+
If the `up` command doesn't find a Dockerfile, it automatically uses Buildpacks to turn your application source into a runnable container. Since the Buildpack is trying to run the build on your behalf, you need to tell the `up` command which port to send ingress traffic to.
In a browser window, go to the GitHub repository for your preferred language and fork the repository.
172
+
::: zone pivot="with-dockerfile"
173
+
174
+
In a browser window, go to the GitHub repository for your preferred language and fork the repository.
173
175
174
176
# [C#](#tab/csharp)
175
177
176
-
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-csharp) to fork the repo to your account.
178
+
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-csharp) to fork the repo to your account. Then copy the repo URL to use it
179
+
in the next step.
180
+
181
+
182
+
# [Java](#tab/java)
183
+
184
+
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-java) to fork the repo to your account. Then copy the repo URL to use it
185
+
in the next step.
186
+
187
+
188
+
# [JavaScript](#tab/javascript)
189
+
190
+
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-javascript) to fork the repo to your account. Then copy the repo URL to use it
191
+
in the next step.
192
+
193
+
194
+
# [Python](#tab/python)
195
+
196
+
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-python) to fork the repo to your account. Then copy the repo URL to use it
197
+
in the next step.
198
+
199
+
200
+
# [Go](#tab/go)
201
+
202
+
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-go) to fork the repo to your account. Then copy the repo URL to use it
203
+
in the next step.
204
+
205
+
::: zone-end
177
206
178
207
179
208
::: zone pivot="without-dockerfile"
180
209
181
-
# [Java](#tab/java)
210
+
In a browser window, go to the GitHub repository for your preferred language and fork the repository **including branches**.
211
+
212
+
# [C#](#tab/csharp)
182
213
183
-
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-java) to fork the repo to your account.
214
+
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-csharp) to fork the repo to your account. Uncheck "Copy the `main` branch only"
215
+
to also fork the `buildpack` branch.
184
216
185
-
> [!NOTE]
186
-
> The Java sample only supports a Maven build, which results in an executable JAR file. The build uses the default settings, as passing in environment variables is not supported.
187
217
188
-
:::zone-end
218
+
# [Java](#tab/java)
219
+
220
+
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-java) to fork the repo to your account. Uncheck "Copy the `main` branch only"
221
+
to also fork the `buildpack` branch.
189
222
190
223
191
224
# [JavaScript](#tab/javascript)
192
225
193
-
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-javascript) to fork the repo to your account.
226
+
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-javascript) to fork the repo to your account. Uncheck "Copy the `main` branch only"
227
+
to also fork the `buildpack` branch.
194
228
195
229
196
230
# [Python](#tab/python)
197
231
198
-
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-python) to fork the repo to your account.
199
-
232
+
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-python) to fork the repo to your account. Uncheck "Copy the `main` branch only"
233
+
to also fork the `buildpack` branch.
200
234
201
-
::: zone pivot="with-dockerfile"
202
235
203
236
# [Go](#tab/go)
204
237
205
-
Select the **Fork** button at the top of the [album API repo](https://github.com/azure-samples/containerapps-albumapi-go) to fork the repo to your account.
238
+
Azure Container Apps cloud build doesn't currently support Buildpacks for Go.
206
239
207
240
::: zone-end
208
241
242
+
209
243
---
210
244
211
245
## Build and deploy the container app
212
246
213
247
Build and deploy your first container app from your forked GitHub repository with the `containerapp up` command. This command will:
214
248
249
+
::: zone pivot="with-dockerfile"
215
250
- Create the resource group
216
251
- Create the Container Apps environment with a Log Analytics workspace
217
-
::: zone pivot="with-dockerfile"
218
252
- Create an Azure Container Registry
253
+
- Create a GitHub Action workflow to build and deploy the container app
219
254
::: zone-end
255
+
220
256
::: zone pivot="without-dockerfile"
257
+
- Create the resource group
258
+
- Create the Container Apps environment with a Log Analytics workspace
221
259
- Automatically create a default registry as part of your environment
222
-
::: zone-end
223
260
- Create a GitHub Action workflow to build and deploy the container app
261
+
::: zone-end
224
262
225
263
When you push new code to the repository, the GitHub Action will:
226
264
227
265
::: zone pivot="with-dockerfile"
228
266
- Build the container image and push it to the Azure Container Registry
229
267
- Deploy the container image to the created container app
268
+
269
+
The `up` command uses the Dockerfile in the root of the repository to build the container image. The target port is defined by the EXPOSE instruction in the Dockerfile. A Docker file isn't required to build a container app.
230
270
::: zone-end
271
+
231
272
::: zone pivot="without-dockerfile"
232
273
- Automatically detect the language and runtime
233
274
- Build the image using the appropriate Buildpack
234
275
- Push the image into the Azure Container Apps default registry
276
+
277
+
The container app needs to be accessible to ingress traffic. Ensure to expose port 8080 to listen for incoming requests.
235
278
::: zone-end
236
279
237
280
::: zone pivot="with-dockerfile"
238
-
The `up` command uses the Dockerfile in the root of the repository to build the container image. The target port is defined by the EXPOSE instruction in the Dockerfile. A Docker file isn't required to build a container app.
281
+
In the command below, replace the `<YOUR_GITHUB_REPOSITORY_NAME>` with your GitHub repository name in the form of `https://github.com/<OWNER>/<REPOSITORY-NAME>` or `<OWNER>/<REPOSITORY-NAME>`.
239
282
::: zone-end
240
283
241
284
::: zone pivot="without-dockerfile"
242
-
The container app needs to be accessible to ingress traffic. Ensure to expose port 8080 to listen for incoming requests.
285
+
In the command below, replace the `<YOUR_GITHUB_REPOSITORY_NAME>` with your GitHub repository name in the form of `https://github.com/<OWNER>/<REPOSITORY-NAME>` or `<OWNER>/<REPOSITORY-NAME>`. Use the `--branch buildpack` option to point to the sample source without a Dockerfile.
243
286
::: zone-end
244
287
245
-
In the command below, replace the `<YOUR_GITHUB_REPOSITORY_NAME>` with your GitHub repository name in the form of `https://github.com/<OWNER>/<REPOSITORY-NAME>` or `<OWNER>/<REPOSITORY-NAME>`.
0 commit comments