For developers
Project configuration
Example: Django
1min
YAML
1clusterName: unicorn
2clusterRegion: eu-west-2
3projectName: example
4
5applications:
6 django:
7 type: python:nginx
8 appRoot: ./django
9 database:
10 type: mysql
11 excludeTablesFromImportOnDevEnvs: [ ]
12 persistentStorages:
13 static:
14 path: static
15 nginx:
16 version: 1.25
17 environmentVariables:
18 NGINX_STATIC_OPEN_FILE_CACHE: "off"
19 NGINX_ERROR_LOG_LEVEL: debug
20 NGINX_VHOST_PRESET: django
21 NGINX_DJANGO_STATIC_ROOT: /usr/src/app/static/
22 NGINX_DJANGO_MEDIA_ROOT: /usr/src/app/media/
23 python:
24 version: 3.12
25 environmentVariables:
26 BACKEND_HOST: "{{ django.host.0 }}"
27 environmentFiles:
28 - ./path/to/your/.env
29 port: 8080
30 hooks:
31 build: |
32 set -eu
33 pip install poetry==1.5.1
34 poetry install
35 poetry run python manage.py collectstatic --no-input
36 run: |
37 poetry run gunicorn innovationcanvas.wsgi:application -b :8080 2>&1
38