-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathdevfile.yaml
More file actions
65 lines (65 loc) · 2.04 KB
/
devfile.yaml
File metadata and controls
65 lines (65 loc) · 2.04 KB
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
63
64
65
schemaVersion: 2.1.0
metadata:
name: python-django
displayName: Django
description: "Django is a high-level Python web framework that enables rapid development of secure and maintainable websites.
Built by experienced developers, Django takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel.
It is free and open source, has a thriving and active community, great documentation, and many options for free and paid-for support."
icon: https://static.djangoproject.com/img/logos/django-logo-positive.svg
tags:
- Django
- Python
- Pip
projectType: Django
language: Python
provider: Red Hat
version: 2.1.0
starterProjects:
- name: django-example
git:
remotes:
origin: https://github.com/devfile-samples/python-django-ex
components:
- name: py-web
container:
image: registry.access.redhat.com/ubi9/python-39:1-1775726797
args: ["tail", "-f", "/dev/null"]
mountSources: true
endpoints:
- name: http-django
targetPort: 8000
- exposure: none
name: debug
targetPort: 5858
env:
- name: DEBUG_PORT
value: '5858'
commands:
- id: pip-install-requirements
exec:
commandLine: pip install -r requirements.txt
workingDir: ${PROJECT_SOURCE}
group:
kind: build
isDefault: true
component: py-web
- id: run-app
exec:
commandLine: 'python manage.py runserver 0.0.0.0:8000'
workingDir: ${PROJECT_SOURCE}
component: py-web
group:
kind: run
isDefault: true
- id: run-migrations
exec:
commandLine: 'python manage.py migrate'
workingDir: ${PROJECT_SOURCE}
component: py-web
- id: debug
exec:
commandLine: 'pip install debugpy && export DEBUG_MODE=True && python -m debugpy --listen 0.0.0.0:${DEBUG_PORT} manage.py runserver 0.0.0.0:8000 --noreload --nothreading'
workingDir: ${PROJECT_SOURCE}
component: py-web
group:
kind: debug