forked from symfony/demo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
devfile.yaml
75 lines (69 loc) · 1.84 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
schemaVersion: 2.2.2
metadata:
name: php-symfony
components:
- name: tools
container:
image: quay.io/devfile/universal-developer-image:ubi8-latest
endpoints:
- exposure: public
name: symfony
protocol: https
targetPort: 8000
memoryLimit: 2G
mountSources: true
volumeMounts:
- name: composer
path: /home/user/.composer
- name: symfony
path: /home/user/.symfony5
- name: composer
volume:
size: 512Mi
- name: symfony
volume:
size: 512Mi
- name: mysql
container:
image: quay.io/eclipse/che--centos--mysql-57-centos7:latest-e08ee4d43b7356607685b69bde6335e27cf20c020f345b6c6c59400183882764
memoryLimit: 300Mi
endpoints:
- exposure: internal
name: db
protocol: tcp
targetPort: 3306
env:
- name: MYSQL_USER
value: db_user
- name: MYSQL_PASSWORD
value: db_password
- name: MYSQL_DATABASE
value: db_name
- name: MYSQL_ROOT_PASSWORD
value: db_password
mountSources: false
commands:
- id: install-dependencies
exec:
label: "Install dependencies"
component: tools
workingDir: ${PROJECT_SOURCE}
commandLine: "composer install && wget https://get.symfony.com/cli/installer -O - | bash"
group:
kind: build
- id: start-web-server
exec:
label: "Start Symfony Web Server"
component: tools
workingDir: ${PROJECT_SOURCE}
commandLine: "$HOME/.symfony5/bin/symfony server:start"
group:
kind: run
- id: stop-web-server
exec:
label: "Stop Symfony Web Server"
component: tools
workingDir: ${PROJECT_SOURCE}
commandLine: "$HOME/.symfony5/bin/symfony server:stop"
group:
kind: run