-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.platform.app.yaml
63 lines (47 loc) · 1.6 KB
/
.platform.app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# The name of the app. Must be unique within a project.
name: app
# The type of the application to build
type: 'python:3.10'
mounts:
'computer_vision_model_api/api':
source: local
source_path: api
# Set properties for poetry
variables:
env:
POETRY_VERSION: '1.8.2'
POETRY_VIRTUALENVS_IN_PROJECT: true
POETRY_VIRTUALENVS_CREATE: true
# The size of the persistent disk of the application (in MB)
disk: 4096
web:
upstream:
# Ensure your app listens on the right socket
socket_family: unix
commands:
# The exact command varies based on the server you use
# 2) ASGI: uvicorn
# start: "poetry run gunicorn -k uvicorn.workers.UvicornWorker -w 4 -b unix:$SOCKET app.wsgi:application"
start: "python main.py"
relationships:
postgresql: 'postgresql:postgresql'
hooks:
build: |
# Fail the build if any part fails
set -e
# Install poetry
export PIP_USER=false
curl -sSL https://install.python-poetry.org | python3 - --version $POETRY_VERSION
export PATH="/app/.local/bin:$PATH"
export PIP_USER=true
# Install dependencies
poetry install
# The following block defines a single writable directory, 'web/uploads'
# The 'source' specifies where the writable mount is. The 'local' source
# indicates that the mount point will point to a local directory on the
# application container. The 'source_path' specifies the subdirectory
# from within the source that the mount should point at.
# mounts:
# 'web/uploads':
# source: local
# source_path: uploads