-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Showing
20 changed files
with
1,623 additions
and
28 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
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,21 @@ | ||
name: Daily_Backend_Update_Dev | ||
|
||
on: | ||
schedule: | ||
- cron: '0 7 * * *' | ||
|
||
jobs: | ||
dev_update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: run update script on AWS dev | ||
uses: appleboy/ssh-action@master | ||
with: | ||
username: ec2-user | ||
host: ${{ secrets.AWS_SSH_HOST_DEV }} | ||
key: ${{ secrets.AWS_SSH_PEM_KEY }} | ||
command_timeout: 60m | ||
script: | | ||
set -e | ||
cd 311-data/server | ||
docker-compose run --rm prefect python flow.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 |
---|---|---|
@@ -1,23 +1,34 @@ | ||
# For more information, please refer to https://aka.ms/vscode-docker-python | ||
FROM python:3.7-slim-buster | ||
|
||
# Keeps Python from generating .pyc files in the container | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
|
||
# Turns off buffering for easier container logging | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Install gcc and g++ to build pysupercluster (may not need) | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
gcc \ | ||
g++ \ | ||
&& apt-get clean | ||
|
||
WORKDIR /home/api | ||
# Install pip requirements | ||
ADD requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY requirements.txt . | ||
# Add the application code | ||
WORKDIR /app | ||
ADD . /app | ||
|
||
RUN pip install --no-cache-dir -r /home/api/requirements.txt | ||
# Switch to a non-root user, please refer to https://aka.ms/vscode-docker-python-user-rights | ||
RUN useradd appuser && chown -R appuser /app | ||
USER appuser | ||
|
||
# Tell Prefect where to look for the config | ||
ENV PYTHONPATH=.:/app/code | ||
ENV APP_HOST=0.0.0.0 | ||
# need add the src folder to sys.path for compatibility | ||
ENV PYTHONPATH=.:/home/api/code:/home/api/src | ||
|
||
EXPOSE 5000 | ||
|
||
COPY . . | ||
|
||
CMD gunicorn lacity_data_api.asgi:app -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:5000 | ||
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug | ||
CMD python code/run.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
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,31 @@ | ||
**/output/ | ||
**/results/ | ||
**/dask-worker-space/ | ||
**/.github | ||
**/docs | ||
|
||
**/__pycache__ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/azds.yaml | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
README.md |
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,136 @@ | ||
# Added stuff for project | ||
results/ | ||
output/ | ||
dask-worker-space/ | ||
.vscode/ | ||
.DS_Store | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ |
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,26 @@ | ||
# For more information, please refer to https://aka.ms/vscode-docker-python | ||
FROM python:3.7-slim-buster | ||
|
||
# Keeps Python from generating .pyc files in the container | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
|
||
# Turns off buffering for easier container logging | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Install gcc to build psutil wheel used by Dask | ||
RUN apt-get update -y && apt-get install -y gcc | ||
|
||
# Install pip requirements | ||
ADD requirements.txt . | ||
RUN python -m pip install -r requirements.txt | ||
|
||
# Add the application code | ||
WORKDIR /app | ||
ADD . /app | ||
|
||
# Switch to a non-root user, please refer to https://aka.ms/vscode-docker-python-user-rights | ||
RUN useradd appuser && chown -R appuser /app | ||
USER appuser | ||
|
||
# Tell Prefect where to look for the config | ||
ENV PREFECT__USER_CONFIG_PATH ./config.toml |
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,17 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
pytest = "*" | ||
flake8 = "*" | ||
|
||
[packages] | ||
prefect = "*" | ||
sodapy = "*" | ||
psycopg2-binary = "*" | ||
pendulum = "*" | ||
|
||
[requires] | ||
python_version = "3.7" |
Oops, something went wrong.