|
| 1 | +# Starter Sample #REMOVE_ME_AFTER_EDITING |
| 2 | + |
| 3 | +[1-click deploy](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-<YOUR_SAMPLE_DIR#REMOVE_ME_AFTER_EDITING>-template%26template_owner%3DDefangSamples) |
| 4 | + |
| 5 | +This is a sample that shows the rough structure of an actual Defang sample. This top paragraph should give a bit of context about the project and what it does. The rest of the README should be a guide on how to use the sample. #REMOVE_ME_AFTER_EDITING |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +1. [!NOTE] Download [Defang CLI](https://github.com/DefangLabs/defang) |
| 10 | +2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) authenticated with your AWS account |
| 11 | +3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/) |
| 12 | + |
| 13 | +## Development |
| 14 | + |
| 15 | +To run the application locally, you can use the following command: |
| 16 | + |
| 17 | +```bash |
| 18 | +# This might be `docker compose -f compose.dev.yaml up` depending on the project. #REMOVE_ME_AFTER_EDITING |
| 19 | +docker compose up |
| 20 | +``` |
| 21 | + |
| 22 | +## Configuration |
| 23 | +#REMOVE_ME_AFTER_EDITING - this section should be removed if there are no configuration values needed. The intro text can probably stay, but the list of configuration values should be updated/removed if there are none. |
| 24 | + |
| 25 | +For this sample, you will need to provide the following [configuration](https://docs.defang.io/docs/concepts/configuration). Note that if you are using the 1-click deploy option, you can set these values as secrets in your GitHub repository and the action will automatically deploy them for you. |
| 26 | + |
| 27 | +### `API_KEY` #REMOVE_ME_AFTER_EDITING |
| 28 | +An explanation of what the env var (`API_KEY`) is, etc. |
| 29 | + |
| 30 | +## Deployment |
| 31 | + |
| 32 | +> [!NOTE] |
| 33 | +> Download [Defang CLI](https://github.com/DefangLabs/defang) |
| 34 | +
|
| 35 | +### Defang Playground |
| 36 | + |
| 37 | +Deploy your application to the defang playground by opening up your terminal and typing `defang up`. |
| 38 | + |
| 39 | +### BYOC (AWS) |
| 40 | + |
| 41 | +If you want to deploy to your own cloud account, you can use Defang BYOC: |
| 42 | + |
| 43 | +1. [Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`. |
| 44 | +2. Run `defang up` in a terminal that has access to your AWS environment variables. |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +Title: Sample Title #REMOVE_ME_AFTER_EDITING |
| 49 | + |
| 50 | +Short Description: A short sentence or two describing the sample. #REMOVE_ME_AFTER_EDITING |
| 51 | + |
| 52 | +Tags: Tags, That, Are, Not, Programming, Languages #REMOVE_ME_AFTER_EDITING |
| 53 | + |
| 54 | +Languages: Programming, Languages, Used #REMOVE_ME_AFTER_EDITING |
0 commit comments