Skip to content

Commit

Permalink
Merge pull request #173 from rcpch/prerelease
Browse files Browse the repository at this point in the history
Merge Prerelease into Live
  • Loading branch information
pacharanero authored Jul 31, 2021
2 parents cc4326d + 105ff78 commit b6ffe26
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.0.1
current_version = 3.0.3
tag = True
commit = True

Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/prerelease_rcpch-dgc-server-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Docs for the Azure Web Apps Deploy action: https://go.microsoft.com/fwlink/?linkid=2134798
# More GitHub Actions for Azure: https://go.microsoft.com/fwlink/?linkid=2135048

name: Azure App Service - rcpch-dgc-server-prerelease(Production), Build and deploy Python app

on:
push:
branches:
- prerelease

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
# checkout the repo
- name: 'Checkout Github Action'
uses: actions/checkout@master


- name: Set up Python version
uses: actions/setup-python@v1
with:
python-version: '3.8'

- name: Build using AppService-Build
uses: azure/appservice-build@v2
with:
platform: python
platform-version: '3.8'

- name: Run Azure webapp deploy action using publish profile credentials
uses: azure/webapps-deploy@v2
with:
app-name: rcpch-dgc-server-prerelease
slot-name: Production
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_A25B845A90A94C7786D88F863BBF679D }}

2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fastapi-refactor
live-dgc-server
6 changes: 1 addition & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from routers import uk_who, turners, trisomy_21

### API VERSION ###
version='3.0.1' # this is set by bump version
version='3.0.3' # this is set by bump version
API_SEMANTIC_VERSION = version


Expand All @@ -33,19 +33,15 @@ class Settings(BaseSettings):
allow_headers=["*"],
)



# include routers for each type of endpoint
app.include_router(uk_who)
app.include_router(turners)
app.include_router(trisomy_21)


@app.get("/")
def read_root():
return {"200 OK"}


def custom_openapi():
if app.openapi_schema:
print(openapi_schema)
Expand Down
2 changes: 1 addition & 1 deletion requirements/common-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# standard dependencies
typing
# typing # this may be causing build errors in Azure. Typing is built in after Python 3.5

# third party dependencies
fastapi
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions s/uvicorn-start-prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# runs the API server in production mode
# using gunicorn to manage 4 uvicorn workers
# used by Azure on deploy command

gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app

0 comments on commit b6ffe26

Please sign in to comment.