forked from sclorg/cakephp-ex
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdevfile.yaml
56 lines (56 loc) · 1.52 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
schemaVersion: 2.1.0
metadata:
name: cakephp-ex
components:
- name: tools
container:
image: registry.redhat.io/devspaces/udi-rhel8:3.6
memoryLimit: 1Gi
endpoints:
- exposure: public
name: cake
protocol: http
targetPort: 8080
volumeMounts:
- name: composer
path: /home/user/.composer
- name: composer
volume:
size: 1G
commands:
- id: 1-install-dependencies
exec:
component: tools
workingDir: ${PROJECTS_ROOT}/cakephp-ex
commandLine: composer install --no-interaction
group:
kind: build
- id: 2-index-workspace
exec:
component: tools
workingDir: ${PROJECTS_ROOT}/cakephp-ex
commandLine: |
msg="# Execute 'Intelephense: Index workspace' from Command palette (F1) to fix diagnostics #"
edge=$(echo "$msg" | sed 's/./#/g')
echo "$edge"
echo "$msg"
echo "$edge"
group:
kind: build
- id: 3-configure-web-server
exec:
component: tools
commandLine: |
if grep -q '\"/projects\"$' /etc/httpd/conf/httpd.conf; then
sed -i 's|DocumentRoot.*|DocumentRoot \"/projects/cakephp-ex\"|' /etc/httpd/conf/httpd.conf
else
echo "DocumentRoot already configured!"
fi
group:
kind: build
- id: 4-start-web-server
exec:
component: tools
commandLine: "httpd -k start\ntail -f /etc/httpd/logs/access_log &\ntail -f /etc/httpd/logs/error_log"
group:
kind: run