Skip to content

Instantly share code, notes, and snippets.

@rhopp
Last active September 23, 2019 13:15
Show Gist options
  • Save rhopp/27b24f3e77b878c17f609cd6bed8c316 to your computer and use it in GitHub Desktop.
Save rhopp/27b24f3e77b878c17f609cd6bed8c316 to your computer and use it in GitHub Desktop.
metadata:
name: MyWebAppg
projects:
- name: MyWebApp
source:
location: https://github.com/rhopp/myapplikace.git
type: git
branch: master
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
memoryLimit: 512Mi
type: dockerimage
volumes:
- name: composer
containerPath: /home/user/.composer
- name: symfony
containerPath: /home/user/.symfony
alias: php
image: 'quay.io/eclipse/che-php-7:nightly'
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/MyWebApp/public_html|' /etc/apache2/sites-available/000-default.conf
else
echo "DocumentRoot already configured!"
fi
component: php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment