Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AndrienkoAleksandr/0351cde0fca283e2df718ece4c8fa9b9 to your computer and use it in GitHub Desktop.
Save AndrienkoAleksandr/0351cde0fca283e2df718ece4c8fa9b9 to your computer and use it in GitHub Desktop.
php 7.2
metadata:
name: wksp-uu0r
projects:
- name: php-web-simple
source:
location: 'https://github.com/che-samples/web-php-simple'
type: git
attributes:
persistVolumes: 'false'
components:
- id: redhat/php/latest
memoryLimit: 1Gi
type: chePlugin
- id: redhat/php-debugger/latest
memoryLimit: 256Mi
type: chePlugin
- mountSources: true
endpoints:
- name: 8080/tcp
port: 8080
command:
- tail
- '-f'
- /dev/null
memoryLimit: 512Mi
type: dockerimage
volumes:
- name: composer
containerPath: /home/user/.composer
- name: symfony
containerPath: /home/user/.symfony
alias: php
image: registry.access.redhat.com/ubi7/php-72
apiVersion: 1.0.0
commands:
- name: Start Apache Web Server
actions:
- type: exec
command: service apache2 start
component: php
- name: Stop Apache Web Server
actions:
- type: exec
command: service apache2 stop
component: php
- name: Restart Apache Web Server
actions:
- type: exec
command: service apache2 restart
component: php
- name: Configure Apache Web Server DocumentRoot
actions:
- type: exec
command: >
if grep -q '/projects$' /etc/apache2/sites-available/000-default.conf;
then
sed -i 's|DocumentRoot /projects|DocumentRoot /projects/php-web-simple|' /etc/apache2/sites-available/000-default.conf
else
echo "DocumentRoot already configured!"
fi
component: php
- name: Debug current file
actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"stopOnEntry": true,
"cwd": "${fileDirname}",
"port": 9000,
"runtimeExecutable": "php"
}
]
}
type: vscode-launch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment