-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ddd3343
Showing
318 changed files
with
17,521 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Dockerfile | ||
README.md | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
__pycache__ | ||
.pytest_cache | ||
*~ | ||
/venv | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FLASK_APP=main.py | ||
FLASK_ENV=development | ||
FLASK_DEBUG=1 | ||
TEMPLATES_AUTO_RELOAD=1 | ||
FLASK_RUN_HOST=localhost | ||
FLASK_RUN_PORT=8070 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
!svc_acct_cred.json | ||
/venv | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
node_modules | ||
bower_components | ||
*.pyc | ||
.DS_Store | ||
/venv | ||
__pycache__/ | ||
*~ | ||
/.vscode/ | ||
/ide/.vscode | ||
/ide/flask_secret.py | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
# Use the official lightweight Python image. | ||
# https://hub.docker.com/_/python | ||
FROM python:3.10-slim | ||
|
||
# Allow statements and log messages to immediately appear in the Knative logs | ||
ENV PYTHONUNBUFFERED True | ||
|
||
# Copy local code to the container image. | ||
ENV APP_HOME /app | ||
WORKDIR $APP_HOME | ||
|
||
RUN groupadd -r pyuser && useradd -r -g pyuser pyuser | ||
|
||
RUN mkdir /home/pyuser | ||
|
||
RUN chown -R pyuser:pyuser /home/pyuser | ||
|
||
RUN chown -R pyuser:pyuser $APP_HOME | ||
|
||
COPY requirements.txt $APP_HOME | ||
|
||
RUN python3 -m venv $APP_HOME/venv | ||
|
||
RUN $APP_HOME/venv/bin/pip install -U pip | ||
|
||
RUN $APP_HOME/venv/bin/pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . /app | ||
|
||
RUN chown -R pyuser:pyuser $APP_HOME | ||
|
||
USER pyuser | ||
|
||
# Run the web service on container startup. Here we use the gunicorn | ||
# webserver, with one worker process and 8 threads. | ||
# For environments with multiple CPU cores, increase the number of workers | ||
# to be equal to the cores available. | ||
# Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling. | ||
|
||
CMD exec $APP_HOME/venv/bin/gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Cloud service to run RapydScript WebVPython programs | ||
|
||
This is a runner for RapydScript WebVPython programs. The runner is meant to be embedded as an iframe within a host application. The host communicates with the runner through the iframe's "postMessage" method. | ||
|
||
The runner can send results, errors, and screen grabs back to the host window postMessge. | ||
|
||
You must configure the "trusted host" environment variable on the deployed system to match the root URL of the host using this runner. | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
body { margin-bottom: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px } | ||
|
||
|
||
a:link, a:visited, a:hover { | ||
color: #0000ff; | ||
font-weight: bold; | ||
text-decoration: none; | ||
} | ||
|
||
a:hover { | ||
text-decoration: underline; | ||
} | ||
/* overrides decoration from previous rule for hovered links */ | ||
|
||
td, textarea, input, select { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px} | ||
.sectionHead { font-size: 16px; line-height: 30px; font-weight: bold; color: #000000;} | ||
.tableDetail { background-color: #CCCCCC;} | ||
.tableHeading { color:#FFFFFF; text-decoration: bold ; background-color: #424973} | ||
.Courier { | ||
font-family: "Courier New", Courier, monospace; | ||
} | ||
.program { | ||
font-family: "Courier New", Courier, monospace; | ||
color: #03F; | ||
} | ||
.program { | ||
color: #00C; | ||
font-family: "Courier New", Courier, monospace; | ||
font-weight: bold; | ||
} |
Oops, something went wrong.