Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sspickle committed Jun 14, 2023
0 parents commit f7a28d6
Show file tree
Hide file tree
Showing 402 changed files with 268,674 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Dockerfile
README.md
*.pyc
*.pyo
*.pyd
__pycache__
.pytest_cache
*~
/venv

5 changes: 5 additions & 0 deletions .flaskenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FLASK_APP=main.py
FLASK_ENV=development
FLASK_RUN_HOST=localhost
FLASK_RUN_PORT=8080

3 changes: 3 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
!svc_acct_cred.json
/venv

9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.pyc
*.pyo
*.pyd
__pycache__
.pytest_cache
svc_acct_cred.json
*~
/venv

6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8"
},
"python.formatting.provider": "none"
}
41 changes: 41 additions & 0 deletions Dockerfile
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Cloud service to run RapydScript WebVPython programs



30 changes: 30 additions & 0 deletions css/help.css
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;
}
Loading

0 comments on commit f7a28d6

Please sign in to comment.