Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import TabItem from '@theme/TabItem';

---

The **Dockerfile** is a file which gives the Apify platform (or Docker, more specifically) instructions on how to create an environment for your code to run in. Every Actor must have a Dockerfile, as Actors run in Docker containers.
The **Dockerfile** is a file which gives the Apify platform (or Docker, more specifically) instructions on how to create an environment for your code to run in. Every Actor must have a Dockerfile, as Actors run in Docker containers. Place the Dockerfile in the `.actor` directory alongside your `actor.json` file.

:::note Local testing

Expand Down
9 changes: 5 additions & 4 deletions sources/academy/platform/deploying_your_code/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ Here are a few examples of Actors in other languages:

## The "Actorization" workflow {#workflow}

Follow these four main steps to turn a piece of code into an Actor:
Follow these main steps to turn a piece of code into an Actor:

1. Handle [accepting inputs and writing outputs](./inputs_outputs.md).
2. Create an [input schema](./input_schema.md) _(optional)_.
3. Add a [Dockerfile](./docker_file.md).
4. [Deploy](./deploying.md) to the Apify platform!
2. Create a [`.actor` directory](/platform/actors/development/actor-definition) with an `actor.json` file to define your Actor.
3. Create an [input schema](./input_schema.md) _(optional)_.
4. Add a [Dockerfile](./docker_file.md).
5. [Deploy](./deploying.md) to the Apify platform!

## Our example project

Expand Down
16 changes: 11 additions & 5 deletions sources/academy/platform/deploying_your_code/input_schema.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: How to write Actor input schema
description: Learn how to generate a user interface on the platform for your Actor's input with a single file - the INPUT_SCHEMA.json file.
description: Learn to generate a user interface on the Apify platform for your Actor's input using the input schema file inside the .actor directory.
sidebar_position: 2
slug: /deploying-your-code/input-schema
---

**Learn how to generate a user interface on the platform for your Actor's input with a single file - the INPUT_SCHEMA.json file.**
**Learn to generate a user interface on the Apify platform for your Actor's input using the input schema file inside the `.actor` directory.**

---

Though writing an [input schema](/platform/actors/development/actor-definition/input-schema) for an Actor is not a required step, it's definitely an ideal one. The Apify platform will read the `INPUT_SCHEMA.json` file within the root of your project and generate a user interface for entering input into your Actor, which makes it significantly easier for non-developers (and even developers) to configure and understand the inputs your Actor can receive. Because of this, we'll be writing an input schema for our example Actor.
Though writing an [input schema](/platform/actors/development/actor-definition/input-schema) for an Actor is not a required step, it's definitely an ideal one. The Apify platform reads the input schema from the [`.actor` directory](/platform/actors/development/actor-definition) and generates a user interface for entering input into your Actor, which makes it significantly easier for non-developers (and even developers) to configure and understand the inputs your Actor can receive. Because of this, we'll be writing an input schema for our example Actor.

:::note JSON requirement

Expand All @@ -19,7 +19,13 @@ Without an input schema, the users of our Actor will have to provide the input i

## Schema title & description {#title-and-description}

In the root of our project, we'll create a file named **INPUT_SCHEMA.json** and start writing the first part of the schema.
Inside the `.actor` directory at the root of our project, we'll create a file named **INPUT_SCHEMA.json** (so the full path is `.actor/INPUT_SCHEMA.json`) and start writing the first part of the schema.

:::tip .actor directory

If you don't have a `.actor` directory yet, create one. This directory contains your Actor's configuration files, including `actor.json`, `INPUT_SCHEMA.json`, `Dockerfile`, and `README.md`. For more details, see the [Actor definition](/platform/actors/development/actor-definition) documentation.

:::

```json
{
Expand Down Expand Up @@ -110,4 +116,4 @@ It's not expected to memorize all of the fields that properties can take or the

## Next up {#next}

In the [next lesson](/platform/actors/development/actor-definition/dataset-schema), we'll learn how to generate an appealing Overview table to display our Actor's results in real time, so users can get immediate feedback about the data being extracted.
In the [next lesson](./output_schema.md), we'll learn how to generate an appealing Overview table to display our Actor's results in real time, so users can get immediate feedback about the data being extracted.
Loading