-
Notifications
You must be signed in to change notification settings - Fork 2
/
devfile.yaml
96 lines (96 loc) · 2.94 KB
/
devfile.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
apiVersion: 1.0.0
metadata:
name: devnation-labs-dashboard-dfmzn
projects:
- name: devnation-labs-dashboard
source:
location: 'https://github.com/redhat-scholars/devnation-labs-dashboard'
type: git
branch: master
components:
- id: ms-python/python/latest
memoryLimit: 512Mi
type: chePlugin
- mountSources: true
endpoints:
- name: flask
port: 5000
memoryLimit: 512Mi
type: dockerimage
alias: python
image: 'quay.io/eclipse/che-python-3.8:nightly'
- type: dockerimage
alias: mariadb
image: >-
registry.redhat.io/rhscl/mariadb-103-rhel7@sha256:d478cf235a6462cf9ac116d08dc6b1c081ffff2b906818b1daade99fb0fdccab
memoryLimit: 512Mi
env:
- name: DATABASE_SERVICE_NAME
value: mariadb-workspace
- name: MYSQL_USER
value: mariadb
- name: MYSQL_PASSWORD
value: mariadb
- name: MYSQL_ROOT_PASSWORD
value: mariadb
- name: MYSQL_DATABASE
value: cluster_booking
volumes:
- name: mariadb-storage
containerPath: /var/lib/mysql
endpoints:
- name: mariadb-workspace
port: 3306
attributes:
discoverable: 'true'
public: 'false'
commands:
- name: install dependencies
actions:
- workdir: '${CHE_PROJECTS_ROOT}/devnation-labs-dashboard'
type: exec
command: '. ${CHE_PROJECTS_ROOT}/.venv/bin/activate && pip install -r requirements.txt'
component: python
- name: migrate
actions:
- workdir: '${CHE_PROJECTS_ROOT}/devnation-labs-dashboard'
type: exec
command: '. ${CHE_PROJECTS_ROOT}/.venv/bin/activate && python manage.py db init && python manage.py db migrate && python manage.py db upgrade'
component: python
- name: run app
actions:
- workdir: '${CHE_PROJECTS_ROOT}/devnation-labs-dashboard'
type: exec
command: '. ${CHE_PROJECTS_ROOT}/.venv/bin/activate && export DEBUG_MODE=False && python app.py'
component: python
- name: run server in debug mode
actions:
- workdir: '${CHE_PROJECTS_ROOT}/devnation-labs-dashboard'
type: exec
command: '. ${CHE_PROJECTS_ROOT}/.venv/bin/activate && export DEBUG_MODE=True && python app.py'
component: python
- name: debug
actions:
- referenceContent: |
{ "version": "0.2.0", "configurations": [
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"port": 5678,
"host": "0.0.0.0",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}"
}
]
}]
}
type: vscode-launch
- name: set up venv
actions:
- workdir: '${CHE_PROJECTS_ROOT}/'
type: exec
command: python -m venv /projects/.venv
component: python