Coder Social home page Coder Social logo

apps-experimenter's Introduction

Setup

To be done once.

  • have apps-experimenter repo with dev branch on github

  • add app-dev.phu73l.net DigitalOcean domain

  • virtualenv -p python3 env

  • source env/bin/activate

  • pip install -r requirements.txt

  • pip install python-dotenv

Have:

  • config.yaml based on config.yaml.sample
  • .env based on .env.sample.

Set up dev instance

Create the app, note the id.

./make_app_yaml.py | doctl --config config.yaml apps create --spec -

Get the hostname from the "Default Ingress" field of the app. This may take a while before it is available.

doctl --config config.yaml apps list <id>

Add CNAME for ws.app-dev.phu73l.net pointing to the app's hostname in DigitalOcean domain. Wait for the domain status to be resolved in the settings page (or just wait longer than the TTL) and for the resulting deploy to finish.

Deploy dev instance

Update source

If source has changed, push to apps-experimenter dev branch on github.

Update config

If .do/app.yaml has changed, update config.

Get the app ID.

doctl --config config.yaml apps list

Update config.

./make_app_yaml.py | doctl --config config.yaml apps update <id> --spec -

Delete dev instance

Get the app ID.

doctl --config config.yaml apps list

Delete the app.

doctl --config config.yaml apps delete <id>

Unit test

  • source env/bin/activate
  • ./test.py

Smoke test

  • source env/bin/activate
  • ./itest.py
  • ./test_server.py

Smoke integration test

Hit the URL on the TwiML page e.g.

wget https://ws.app-dev.phu73l.net/index.xml

Notes

https://docs.digitalocean.com/products/app-platform/reference/app-spec/ https://docs.digitalocean.com/tutorials/app-deploy-flask-app/ https://github.com/digitalocean/sample-python/tree/main

apps-experimenter's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.