Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tasking manager fastapi #6649

Open
wants to merge 190 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 157 commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
812d8fd
feat: initial setup for fastapi
kaditya97 Mar 25, 2024
4e73655
fix: basic setup
kaditya97 Apr 11, 2024
151d878
feat: added pyinstrument for api performance testing
kaditya97 Apr 17, 2024
04dd738
feat: asyncio implementation
kaditya97 Apr 25, 2024
93e0f08
fix: minor import issues
kaditya97 Apr 25, 2024
5af39f7
feat: new docker files with pdm integration
kaditya97 May 7, 2024
4fb15fb
fix: projects all api
kaditya97 May 8, 2024
63d5255
fix: countries api working
kaditya97 May 15, 2024
9f438a1
Fix backend container name on ECS
eternaltyro May 16, 2024
f5d2a6c
Fix image name
eternaltyro May 16, 2024
c535e98
Make deploy job depend on completion of build job
eternaltyro May 16, 2024
cc8dfa4
Test image output from build job
eternaltyro May 16, 2024
5219dcd
Fix image link
eternaltyro May 16, 2024
769a6aa
Fix interpolation in workflow
eternaltyro May 16, 2024
877a506
Move to new Task Definition family
eternaltyro May 16, 2024
3a389ce
Fix github actions output step
eternaltyro May 17, 2024
121332b
Better naming and targeted build
eternaltyro May 17, 2024
9b3e6a7
Fix output format
eternaltyro May 17, 2024
5131dce
Fix syntax error in workflow
eternaltyro May 17, 2024
1e0de89
Fix metadata parse
eternaltyro May 17, 2024
bfa8850
Build metadata fixes
eternaltyro May 17, 2024
6e2bb82
Move shell variables to workflow step env
eternaltyro May 17, 2024
735603a
Fix image_name for push and cleanup Dockerfile
eternaltyro May 17, 2024
206712b
Suppress apt output properly
eternaltyro May 17, 2024
765ca15
Fix output ref
eternaltyro May 17, 2024
e5c2a17
Bug fixes
eternaltyro May 17, 2024
ef02f9d
fix: add json to ignored types in config
kaditya97 May 17, 2024
d25f557
fix: frontend update
kaditya97 May 22, 2024
87c5386
hot-fix: migrations error fix for multiple entry
kaditya97 May 28, 2024
7de60b5
feat: Campaigns get api for fastapi app
prabinoid Jun 3, 2024
83f0e9c
feat: Async post for campaigns api
prabinoid Jun 6, 2024
bc6d488
feat: Campaign retrieve and delete api now works asynchronously
prabinoid Jun 11, 2024
f90170b
Refac: Refactored project retrieve api to work asynchronously
prabinoid Jun 13, 2024
4108b9b
feat: Organisations get apis with statistics
prabinoid Jun 18, 2024
66bad20
feat: Organisations apis updated for managers, teams statistics and d…
prabinoid Jun 25, 2024
7a6bc99
feat: Organisation campaigns and project campaign get apis
prabinoid Jun 25, 2024
b97df62
feat: Organisation post and patch patch apis
prabinoid Jun 27, 2024
08c9575
refac: Campaign, organisations and projects association delete apis a…
prabinoid Jul 2, 2024
a528046
Implement query execution using encode/databases for organisations li…
prabinoid Jul 31, 2024
cde76ab
Organisation retrieve api refactored to work asynchronously using dat…
prabinoid Aug 5, 2024
444a441
Refactor: Get organisation via organisation slug
prabinoid Aug 5, 2024
6c6d8f7
Organisation delete apis refactored and migrations env database uri f…
prabinoid Aug 6, 2024
03d93de
Organisation create, update, statistics refactored and field validato…
prabinoid Aug 8, 2024
7e04c89
Campaign apis refactored and updated organisations list query to retr…
prabinoid Aug 9, 2024
d4859f0
Update campaign refactored
prabinoid Aug 12, 2024
3f7f910
Campaign linkage apis with organisations refactored
prabinoid Aug 13, 2024
9e7838b
Countries api refactored
prabinoid Aug 13, 2024
65ebb84
Project retrieve and countries api refactored
prabinoid Aug 15, 2024
1029208
Project list api and pagination util refactored
prabinoid Aug 21, 2024
cda4421
refactor: licenses
Anuj-Gupta4 Aug 22, 2024
2af1dfa
Refactor: Project campaigns apis
prabinoid Aug 22, 2024
eca216d
refactor: interests
Anuj-Gupta4 Aug 22, 2024
5f20a29
Teams module added to routers and teams get apis refactored.
prabinoid Aug 27, 2024
cce93dc
Project teams api and fixes in project get api queries
prabinoid Aug 27, 2024
a070d7c
Project queries bbox api refactored
prabinoid Aug 29, 2024
c7cbd74
Project admin service, owner projects api and validators refactored
prabinoid Aug 31, 2024
50610fa
Project detail summary and user touched projects api refactored
prabinoid Sep 3, 2024
3b8f140
fix: Campaigns list and allowed usernames list
prabinoid Sep 3, 2024
624d42b
Project user activities apis refactored
prabinoid Sep 3, 2024
e028f43
Project contributions apis and other geom queries apis refactored
prabinoid Sep 4, 2024
f5abba3
refactor: comment
Anuj-Gupta4 Sep 5, 2024
7d0d235
Project statistics and User project statistics refactored
prabinoid Sep 9, 2024
62cc59f
refactor: user's license acceptance
Anuj-Gupta4 Sep 5, 2024
22c6a78
refactor: user rate contributions
Anuj-Gupta4 Sep 6, 2024
6128393
refactor: get user interests
Anuj-Gupta4 Sep 6, 2024
ecaa7cc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 9, 2024
d5cff35
Heartbeat api refactored and ohsome api environment import handled
prabinoid Sep 9, 2024
e6c9d75
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 9, 2024
be9e9e1
Pre commit hooks refactor and db connection param json postgres port …
prabinoid Sep 9, 2024
ee870df
Similar and Popular projects apis refactored and heartbeat api fixed
prabinoid Sep 10, 2024
a8e8d4f
fix: field validator for OrganisationDTO and NewCampaignDTO
kaditya97 Sep 11, 2024
9f8c96a
fix: black formatting
kaditya97 Sep 11, 2024
7c8d465
Project and user favorites apis refactored
prabinoid Sep 10, 2024
9bca1f5
refactor: set user interests
Anuj-Gupta4 Sep 9, 2024
44799b6
refactor: get message
Anuj-Gupta4 Sep 9, 2024
f222976
refactor: get all notifications with filters
Anuj-Gupta4 Sep 10, 2024
83d1aa9
refactor: unread message count
Anuj-Gupta4 Sep 11, 2024
63611ec
refactor: mark messages as read
Anuj-Gupta4 Sep 11, 2024
c2c9af9
refactor: delete messages
Anuj-Gupta4 Sep 11, 2024
d38da07
refactor: update notification time
Anuj-Gupta4 Sep 11, 2024
f81a79d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 12, 2024
032a645
refactor: get user(s)
Anuj-Gupta4 Sep 12, 2024
faeb81a
refactor: query users
Anuj-Gupta4 Sep 13, 2024
c684d81
Tasks meta data api refactored
prabinoid Sep 12, 2024
e7d7a83
Lock task for mapping and its functions refactored
prabinoid Sep 13, 2024
122e815
fix: system and related api's migration
kaditya97 Sep 16, 2024
5b5ee5d
fix: black errors
kaditya97 Sep 16, 2024
7797359
fix: black erros
kaditya97 Sep 16, 2024
ed9dfd1
fix: issues api's
kaditya97 Sep 23, 2024
09515c9
fix: field validator for OrganisationDTO and NewCampaignDTO
kaditya97 Sep 11, 2024
f4145a0
fix: black formatting
kaditya97 Sep 11, 2024
6bc0a42
refactor: set user interests
Anuj-Gupta4 Sep 9, 2024
1bd59b4
refactor: get message
Anuj-Gupta4 Sep 9, 2024
dad9614
refactor: get all notifications with filters
Anuj-Gupta4 Sep 10, 2024
627a028
refactor: mark messages as read
Anuj-Gupta4 Sep 11, 2024
b90ed67
refactor: delete messages
Anuj-Gupta4 Sep 11, 2024
2be6ddf
refactor: update notification time
Anuj-Gupta4 Sep 11, 2024
64a8647
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 12, 2024
85bbfdc
refactor: get user(s)
Anuj-Gupta4 Sep 12, 2024
55e9ae8
refactor: query users
Anuj-Gupta4 Sep 13, 2024
c4193c5
Tasks meta data api refactored
prabinoid Sep 12, 2024
03139f7
Lock task for mapping and its functions refactored
prabinoid Sep 13, 2024
89b7989
fix: system and related api's migration
kaditya97 Sep 16, 2024
facd897
fix: black errors
kaditya97 Sep 16, 2024
58d5d0c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 16, 2024
2684cd5
fix: team api's
kaditya97 Sep 25, 2024
0dcadb8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 23, 2024
30556a8
Invalidate all and lock a task for mapping refactored
prabinoid Sep 17, 2024
447ed7f
Unlock task for mapping and related stats utils refactored
prabinoid Sep 23, 2024
42d01c9
Lock task for validation refactored
prabinoid Sep 24, 2024
a1ccf7a
Unlock task after validation refactored
prabinoid Sep 24, 2024
ddcddcd
fix: precommit changes
kaditya97 Sep 25, 2024
e390397
fix: sonarcloud suggestion
kaditya97 Sep 26, 2024
67cd5fe
Stop task validation refactored
prabinoid Sep 26, 2024
14cc3f6
Stop mapping task refactored
prabinoid Sep 26, 2024
4e49807
Task undo last action refactored
prabinoid Sep 27, 2024
522bf6f
Map all tasks, Validate all tasks and Reset all tasks refactored
prabinoid Sep 27, 2024
f0db2cd
fix: project post requests
kaditya97 Oct 1, 2024
59366a9
fix: user action and related api's
kaditya97 Oct 1, 2024
5967e95
Extend task lock duration and Revert user action from task refactored
prabinoid Sep 30, 2024
5f174b0
Split task api and related methods refactored
prabinoid Oct 1, 2024
01f98f2
fix: user tasks api
kaditya97 Oct 1, 2024
718bfd2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 1, 2024
5d10187
Project tasks gpx and xml export
prabinoid Oct 2, 2024
160d617
fix: project post api
kaditya97 Oct 7, 2024
66bb6c2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 7, 2024
58786bc
fix: Project action filter and user stats
prabinoid Oct 8, 2024
4e70f48
JSONResponse handling and cleanups
prabinoid Oct 9, 2024
b2d0663
fix project filters
prabinoid Oct 15, 2024
01fe7fa
Fix project responses and filters
prabinoid Oct 16, 2024
a3937e9
fix project info dto
prabinoid Oct 16, 2024
dedae6c
fix project teams patch
prabinoid Oct 16, 2024
299d19f
Project patch fixed and dtos refactored
prabinoid Oct 22, 2024
2b38f92
Bulk action being applied for all tasks fixed, due date exception han…
prabinoid Oct 22, 2024
cf1507c
All messages, organisation retrieve and task activities fixes
prabinoid Oct 23, 2024
b1e0f08
Project and notification duplication handled, organisation teams and …
prabinoid Oct 25, 2024
0c14df4
Messages, teams, comments, notification modules and project filters a…
prabinoid Oct 29, 2024
f2c6705
Teams managers and members assignment and retrieve query fixed
prabinoid Nov 4, 2024
bce7821
Task dto last updated attribute made timezone aware and add teams by …
prabinoid Nov 4, 2024
8c38fe5
Project clone and transfer project ownership refactored
prabinoid Nov 5, 2024
4aa995f
Added root validator for project info dto
prabinoid Nov 5, 2024
473a5cf
Split task url and geom fixed
prabinoid Nov 6, 2024
0c10901
Project, organisation teams deletion and other fixes
prabinoid Nov 6, 2024
a917b38
Http exception handler in the app for token expiration handling
prabinoid Nov 11, 2024
22fd980
Register user, retrieve org by id and slug and user interests refactored
prabinoid Nov 12, 2024
54e0d42
feat(backend): Timestamps made utcnow and serialization done with utc…
prabinoid Nov 13, 2024
fc495ce
fix: Join team by request
prabinoid Nov 14, 2024
920bb5c
Task and project card last contributions fixed and list dto for proje…
prabinoid Nov 15, 2024
a6b81c0
fix: Project search and deletion.
prabinoid Nov 15, 2024
3495697
fix: clear priority areas, send message after validation, project com…
prabinoid Nov 18, 2024
11e8d49
fix: Update teams and formatting
prabinoid Nov 18, 2024
f3ae9dc
* Team messaging background task,
prabinoid Nov 19, 2024
d41b8d9
fix: Invalid token exception in TokenAuthBackend
prabinoid Nov 19, 2024
c372e4c
* Send message to contributors and background task.
prabinoid Nov 20, 2024
9d2021f
Revert user task fixed and get latest task activity now returns disti…
prabinoid Nov 20, 2024
a007d5d
* Send message after comment, parse usernames and mentions.
prabinoid Nov 26, 2024
0dc540a
* Rebased against develop.
prabinoid Dec 2, 2024
e313c15
Remove db connection dependency in routers
prabinoid Dec 3, 2024
94b0f8f
Merge pull request #6650 from hotosm/fastapi-refactor
prabinoid Dec 3, 2024
4775217
* Concurrent task validation using asyncio gather
prabinoid Dec 4, 2024
b7fc5e8
Merge pull request #6652 from hotosm/fastapi-refactor
prabinoid Dec 4, 2024
ad245a5
fix: Recommended projects, my tasks in my contrib section and cleanups
prabinoid Dec 4, 2024
8c536f5
Merge pull request #6653 from hotosm/fastapi-refactor
prabinoid Dec 4, 2024
3d91d8e
* Asyncio cron job scheduler set up.
prabinoid Dec 11, 2024
883f0bb
Merge pull request #6654 from hotosm/fastapi-refactor
prabinoid Dec 11, 2024
0906fb0
Aoi, tasks and project non geometries exports and cleanups
prabinoid Dec 11, 2024
2f04334
Merge pull request #6655 from hotosm/fastapi-refactor
prabinoid Dec 11, 2024
9753948
Remove atomic transaction from concurrent task execution
prabinoid Dec 13, 2024
71f3381
Merge pull request #6658 from hotosm/fastapi-refactor
prabinoid Dec 13, 2024
8abc0cd
fix: Tasks added to cloned projects
prabinoid Dec 13, 2024
c34a95f
Merge pull request #6659 from hotosm/fastapi-refactor
prabinoid Dec 13, 2024
1cb3e76
* Export projects as csv
prabinoid Dec 17, 2024
556bb3f
Merge pull request #6660 from hotosm/fastapi-refactor
prabinoid Dec 17, 2024
f0f4002
Private projects filters fixed and author names in list view and csv …
prabinoid Dec 20, 2024
1f4dc8d
Merge pull request #6662 from hotosm/fastapi-refactor
prabinoid Dec 20, 2024
ba39a87
Task statistics and filters refactored
prabinoid Dec 20, 2024
bf44760
Merge pull request #6664 from hotosm/fastapi-refactor
prabinoid Dec 20, 2024
729cd6b
init: locustfile added
mahesh-naxa Dec 17, 2024
682bb7a
Locust and compose files for performance bench marking and its setup …
prabinoid Dec 24, 2024
942a81e
Merge pull request #6666 from hotosm/fastapi-refactor
prabinoid Dec 24, 2024
17b14bf
* Organisation statistics.
prabinoid Dec 26, 2024
e2a11d9
Merge pull request #6667 from hotosm/fastapi-refactor
prabinoid Dec 26, 2024
33d10db
User statistics refactored.
prabinoid Dec 30, 2024
ebfd533
Merge pull request #6668 from hotosm/fastapi-refactor
prabinoid Dec 30, 2024
3423a14
refactor: cron job for auto unlock task.
prabinoid Jan 2, 2025
49b7276
Merge pull request #6669 from hotosm/fastapi-refactor
prabinoid Jan 2, 2025
990dd52
User statistics query results cast to int
prabinoid Jan 2, 2025
fc929cf
Merge pull request #6670 from hotosm/fastapi-refactor
prabinoid Jan 2, 2025
f2dba61
Remove sqlalchemy db configs
prabinoid Jan 2, 2025
136e00b
Merge pull request #6672 from hotosm/fastapi-refactor
prabinoid Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/ecs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ env:
REGISTRY: ghcr.io
AWS_REGION: us-east-1
ECS_CLUSTER: tasking-manager
ECS_SERVICE: tasking-manager-fastAPI
ECS_SERVICE: backend-fastAPI
CONTAINER_NAME: backend
IMAGE_NAME: hotosm/tasking-manager-backend # was ${{ github.repository }}

jobs:
build-push-image:
name: Build Images
image-build-and-push:
name: Build Container Images
runs-on: ubuntu-latest
environment: production

Expand All @@ -24,14 +24,11 @@ jobs:
packages: write

outputs:
imageid: steps.build-push-image.imageid
image_tags: ${{ steps.meta.outputs.tags }}

steps:
- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Buildx
uses: docker/setup-buildx-action@v3
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
Expand All @@ -45,31 +42,34 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

tags: |
type=ref,event=branch
type=raw,value=fastapi

- name: Build and push container image
id: build-push-image
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}"
target: prod
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


deploy:
name: Deploy
name: Deploy to ECS
runs-on: ubuntu-latest
environment: production

needs: image-build-and-push

permissions:
contents: read
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -80,15 +80,15 @@ jobs:

- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition tasking-manager --query taskDefinition > task-definition.json
aws ecs describe-task-definition --task-definition tasking-manager-fastAPI --query taskDefinition > task-definition.json

- name: Task definition rendition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: ${{ env.CONTAINER_NAME }}
image: ${{ needs.build-push-image.outputs.imageid }}
image: ${{ needs.image-build-and-push.outputs.image_tags }}

- name: Deploy task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ htmlcov/

# Docker & Docker compose
docker-compose.override.yml
postgres_data/
42 changes: 17 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
ARG DEBIAN_IMG_TAG=slim-bookworm
ARG PYTHON_IMG_TAG=3.10



FROM docker.io/python:${PYTHON_IMG_TAG}-${DEBIAN_IMG_TAG} as base
ARG APP_VERSION=0.1.0
ARG DOCKERFILE_VERSION=0.5.0
ARG ALPINE_IMG_TAG
ARG DEBIAN_IMG_TAG
ARG PYTHON_IMG_TAG
ARG MAINTAINER=sysadmin@hotosm.org
LABEL org.hotosm.tasks.app-version="${APP_VERSION}" \
Expand All @@ -28,7 +25,7 @@ FROM base as extract-deps
RUN pip install --no-cache-dir --upgrade pip
WORKDIR /opt/python
COPY pyproject.toml pdm.lock README.md /opt/python/
RUN pip install --no-cache-dir pdm==2.18.1
RUN pip install --no-cache-dir pdm==2.8.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small thing, but it might be worth updating pdm to 2.18.1 here to avoid downgrading on merge

RUN pdm export --prod --without-hashes > requirements.txt


Expand All @@ -37,13 +34,14 @@ FROM base as build
RUN pip install --no-cache-dir --upgrade pip
WORKDIR /opt/python
# Setup backend build-time dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
libffi-dev \
libgeos-dev \
postgresql-server-dev-15 \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get -q install --no-install-recommends -y \
build-essential \
postgresql-server-dev-15 \
python3-dev \
libffi-dev \
libgeos-dev
# Setup backend Python dependencies
COPY --from=extract-deps \
/opt/python/requirements.txt /opt/python/
Expand All @@ -60,15 +58,15 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONFAULTHANDLER=1 \
PATH="/home/appuser/.local/bin:$PATH" \
PYTHONPATH="/usr/src/app:$PYTHONPATH" \
PYTHON_LIB="/home/appuser/.local/lib/python$PYTHON_IMG_TAG/site-packages" \
SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
# Setup backend runtime dependencies
RUN apt-get update && \
apt-get install --no-install-recommends -y \
libgeos3.11.1 postgresql-client proj-bin && \
rm -rf /var/lib/apt/lists/*
DEBIAN_FRONTEND=noninteractive \
apt-get -q install --no-install-recommends -y \
postgresql-client libgeos3.11.1 proj-bin curl && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=build \
/home/appuser/.local \
/home/appuser/.local
Expand All @@ -83,25 +81,19 @@ COPY manage.py .

FROM runtime as debug
RUN pip install --user --no-warn-script-location \
--no-cache-dir debugpy==1.8.5
--no-cache-dir debugpy==1.8.1
EXPOSE 5678/tcp
CMD ["python", "-m", "debugpy", "--wait-for-client", "--listen", "0.0.0.0:5678", \
"-m", "gunicorn", "-c", "python:backend.gunicorn", "manage:application", \
"-m", "uvicorn", "backend.main:api", "--host", "0.0.0.0", "--port", "5000", \
"--reload", "--log-level", "error"]



FROM runtime as prod
USER root
RUN apt-get update && \
apt-get install -y curl && \
rm -rf /var/lib/apt/lists/*
# Pre-compile packages to .pyc (init speed gains)
RUN python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1)"
RUN python -m compileall .
EXPOSE 5000/tcp
USER appuser:appuser
# Default gunicorn worker count is 1
# For prod the WEB_CONCURRENCY env var can be used to set this
CMD ["gunicorn", "-c", "python:backend.gunicorn", "manage:application", \
"--log-level", "error"]
CMD ["uvicorn", "backend.main:api", "--host", "0.0.0.0", "--port", "5000", \
"--log-level", "error","--reload"]
Loading
Loading