|
| 1 | +--- |
| 2 | +title: Deploy to Playground |
| 3 | +description: Deploy to the Free Defang Playground |
| 4 | +sidebar_position: 15 |
| 5 | +--- |
| 6 | + |
| 7 | +# Deploy to the playground |
| 8 | + |
| 9 | +This tutorial will show you how to deploy your project to the Defang Playground. |
| 10 | + |
| 11 | +## Pre-requisites |
| 12 | +* [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) |
| 13 | +* [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) |
| 14 | +* [A Defang Account](/docs/getting-started/authenticating) |
| 15 | +* [The Defang CLI](/docs/getting-started/installing) |
| 16 | + |
| 17 | +## Step 1 - Navigate to your project directory |
| 18 | +Head to the folder where your project is located. |
| 19 | +```bash |
| 20 | +$ cd path/to/your/project |
| 21 | +``` |
| 22 | + |
| 23 | +## Step 2 - Deploy |
| 24 | + |
| 25 | +``` |
| 26 | +$ defang up |
| 27 | +``` |
| 28 | + |
| 29 | +If you have not used defang before, you'll be prompted to log in. |
| 30 | + |
| 31 | +``` |
| 32 | + ! Please log in to continue. |
| 33 | +Please visit http://127.0.0.1:49154 and log in. (Right click the URL or press ENTER to open browser) |
| 34 | +``` |
| 35 | + |
| 36 | +:::info |
| 37 | +To learn more about how authentication works in defang, check out the [authenticating page](/docs/getting-started/authenticating). |
| 38 | +::: |
| 39 | + |
| 40 | +When you do this, you should see something similar to the output below: |
| 41 | + |
| 42 | +``` |
| 43 | + * Uploading build context for app |
| 44 | + * Deploying service app |
| 45 | + * Monitor your services' status in the defang portal |
| 46 | + - https://portal.defang.dev/service/app |
| 47 | + * Tailing logs for deployment ID o59k89vk3qc8 ; press Ctrl+C to detach: |
| 48 | + * Press V to toggle verbose mode |
| 49 | +2024-09-19T10:50:53.572443-07:00 cd Update started for stack jordanstephens-prod1 |
| 50 | +2024-09-19T10:51:05.536299-07:00 cd Update succeeded in 11.99769745s ; provisioning... |
| 51 | +2024-09-19T10:51:39.419693-07:00 app Server running at http://0.0.0.0:3000/ |
| 52 | + * Service app is in state DEPLOYMENT_COMPLETED and will be available at: |
| 53 | + - https://jordanstephens-app--3000.prod1.defang.dev |
| 54 | + * Done. |
| 55 | +``` |
| 56 | + |
| 57 | +Now we can go to [https://portal.defang.dev/service/app](https://portal.defang.dev/service/app) to see our service listed in the defang portal. |
| 58 | + |
| 59 | + |
0 commit comments