forked from cakephp/cms-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitpod.yml
28 lines (27 loc) · 1.65 KB
/
.gitpod.yml
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
image: tmy2017/gitpod-pstorm-with-php71-mysql8:ver-1640846949
tasks:
- command: |
gp await-port 8765 && sleep 3 && gp preview $(gp url 8765)/users/login
# change version php
# php & composer binary are all out of /workspace hence can not do as init... must do everytime before workspace starts
# mysql is in workspace, hence can use init
# before + command for every new & *restart* workfspace
- before: |
sudo add-apt-repository ppa:ondrej/php -y && \
sudo install-packages php7.2 php7.2-xdebug php7.2-mysql php7.2-intl php7.2-mbstring php7.2-curl php7.2-simplexml && \
sudo update-alternatives --set php /usr/bin/php7.2
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir /usr/bin --filename composer
php -r "unlink('composer-setup.php');"
cp config/.gitpod.env config/.env
cp config/.gitpod.app_local.php config/app_local.php
# ONLY at NEW workspace, mysql is persisted - hence suitable for db seeding
init: |
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';"
mysql -e "create database cake_cms"
mysql -D cake_cms < config/.gitpod.seed.sql
composer install --no-interaction
command: |
bin/cake server
# try found by https://sourcegraph.com/github.com/BabylonJS/Babylon.js/-/blob/.gitpod.yml?L7