Deploy Your App to the Development Environment

23 steps

Deploy your application to the Development environment and view it live in the browser.

  1. 1

    Navigate to your site detail page.

    Deploy Your App to the Development Environment, step 1
  2. 2

    Click “Github

    Deploy Your App to the Development Environment, step 2
  3. 3

    Click “Code

    Deploy Your App to the Development Environment, step 3
  4. 4

    Copy your app's repo's URL.

    Deploy Your App to the Development Environment, step 4
  5. 5

    Go to your Code Server for the Development Environment (via the browser) and type [[git clone <your repo>]]

    Deploy Your App to the Development Environment, step 5
  6. 6

    To see the file tree for your repo, click this icon.

    Deploy Your App to the Development Environment, step 6
  7. 7

    Click “Open Folder

    Deploy Your App to the Development Environment, step 7
  8. 8

    Click your repo name - eg: “sitename-bedrockflask

    Deploy Your App to the Development Environment, step 8
  9. 9

    Click “OK

    Deploy Your App to the Development Environment, step 9
  10. 10

    Open 2 terminals by clicking the hamburger menu on the very top of the left nav.

    Deploy Your App to the Development Environment, step 10
  11. 11

    Click “Terminal

    Deploy Your App to the Development Environment, step 11
  12. 12

    Click “New Terminal

    Deploy Your App to the Development Environment, step 12
  13. 13

    To duplicate the terminal (which you will need for frontend and backend) click the “+

    Deploy Your App to the Development Environment, step 13
  14. 14

    In one tab, install your frontend webpack by typing the following:\ \ [[sudo npm update]]\ [[sudo npm i]]\ [[npm run watch]]

    Deploy Your App to the Development Environment, step 14
  15. 15

    You will see your webpack is successfully built.

    Deploy Your App to the Development Environment, step 15
  16. 16

    Click “bash” to navigate to the other terminal.

    Deploy Your App to the Development Environment, step 16
  17. 17

    In your Site Detail page, copy the Environment Template.

    Deploy Your App to the Development Environment, step 17
  18. 18

    Navigate back to your code server and click .env in the file tree.

    Deploy Your App to the Development Environment, step 18
  19. 19

    Paste the contents of the Environment Template directly into the .env file and save. Please note your app launch will fail if you are not using the most up to date secret names.

    Deploy Your App to the Development Environment, step 19
  20. 20

    Go back to the terminal and run the backend launch code:\ \ [[source /home/ec2-user/py3.11-venv/bin/activate]] [[pip install -r app/requirements.txt]] [[flask db upgrade]] [[gunicorn --timeout 120 --bind 0.0.0.0:8000 run:app]]

    Deploy Your App to the Development Environment, step 20
  21. 21

    Dont use the forwarded port to view your app - it wont work properly. Instead you can see the functional app output via the URL from your site detail page.

    Deploy Your App to the Development Environment, step 21
  22. 22

    Click “View Your App

    Deploy Your App to the Development Environment, step 22
  23. 23

    You should see “Welcome to AI Chat” - this is your app's default template. Congrats! Now you can go about customizing this to your use case.

    Deploy Your App to the Development Environment, step 23