Skip to content

Commit

Permalink
Ajustes para rodar no gitpod
Browse files Browse the repository at this point in the history
  • Loading branch information
wevertonms committed Dec 11, 2019
1 parent cef5b74 commit ec94130
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM gitpod/workspace-full

USER gitpod

# Install custom tools, runtime, etc. using apt-get
# For example, the command below would install "bastet" - a command line tetris clone:
#
# RUN sudo apt-get -q update && \
# sudo apt-get install -yq bastet && \
# sudo rm -rf /var/lib/apt/lists/*
#
# More information: https://www.gitpod.io/docs/42_config_docker/
15 changes: 15 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
image:
file: .gitpod.Dockerfile

# List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/43_config_ports/
ports:
- port: 5006
onOpen: open-preview

# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/44_config_start_tasks/
tasks:
- init: pipenv install # runs during prebuild
command: pipenv install && pipenv install --dev
vscode:
extensions:
- [email protected]:o+QLHnb+xFH1zuBM7u1VIw==
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
".pylintrc"
],
"python.formatting.provider": "black",
"python.pythonPath": "/home/weverton/.local/share/virtualenvs/statfit-7rupYQ4d/bin/python",
"python.pythonPath": ".venv/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"autoDocstring.docstringFormat": "google",
Expand Down
3 changes: 3 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ pillow = ">=6.2.0"

[requires]
python_version = "3.7"

[pipenv]
allow_prereleases = true
7 changes: 6 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ def modify_doc(doc):


if __name__ == "__main__":
SERVER = Server({"/": modify_doc})
SERVER = Server(
{"/": modify_doc},
allow_websocket_origin=[
"5006-afaf0a19-37a2-4628-8c52-6bbfcf7e190d.ws-us02.gitpod.io"
],
)
SERVER.start()
print(f"Opening Bokeh application on http://localhost:5006/")
SERVER.io_loop.add_callback(SERVER.show, "/")
Expand Down

0 comments on commit ec94130

Please sign in to comment.