-
-
Save wagoodman/22d3cd9724507c3d723bca861e02c8bc to your computer and use it in GitHub Desktop.
Metaparticle talk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import flask | |
app = flask.Flask(__name__) | |
PORT = 8080 | |
@app.route("/") | |
def hello(): | |
return flask.render_template('hello.html') | |
def main(): | |
app.run(host='0.0.0.0', port=PORT) | |
if __name__ == "__main__": | |
main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import flask | |
from metaparticle_pkg import Containerize | |
app = flask.Flask(__name__) | |
PORT = 8080 | |
@app.route("/") | |
def hello(): | |
return flask.render_template('hello.html') | |
@Containerize( | |
package={ | |
'name': 'metaparticle-sandbox', | |
'repository': 'registry.gitlab.com/wagoodman', | |
'publish': True | |
}, | |
runtime={ | |
'ports': [PORT], | |
'executor': 'metaparticle', | |
'replicas': 2, | |
'public': True | |
} | |
) | |
def main(): | |
app.run(host='0.0.0.0', port=port) | |
if __name__ == "__main__": | |
main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import flask | |
from metaparticle_pkg import Containerize | |
app = flask.Flask(__name__) | |
PORT = 8080 | |
@app.route("/") | |
def hello(): | |
return flask.render_template('hello.html') | |
@Containerize( | |
package={ | |
'name': 'metaparticle-sandbox', | |
'repository': 'registry.gitlab.com/wagoodman', | |
'publish': True | |
}, | |
runtime={ | |
'ports': [PORT], | |
'executor': 'metaparticle', | |
'shards': 3, | |
'URLShardPattern': "^\\/([^\\/]*)", | |
'public': True | |
} | |
) | |
def main(): | |
app.run(host='0.0.0.0', port=port) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment