This repository has been archived by the owner on Jan 16, 2025. It is now read-only.
forked from develodesign/magento-gitpod
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitpod.yml
44 lines (44 loc) · 2.24 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
image:
file: .gitpod.Dockerfile
ports:
- port: 8002
visibility: public
onOpen: open-preview
- port: 9001
onOpen: ignore
- port: 15672
onOpen: ignore
visibility: public
vscode:
extensions:
- TabNine.tabnine-vscode@3.4.14
- felixfbecker.php-debug@1.16.0
github:
prebuilds:
master: true
branches: true
tasks:
- openMode: tab-after
name: "Services"
init: sudo chown -R gitpod:gitpod /home/gitpod/.config/composer;
cd $GITPOD_REPO_ROOT &&
composer config -g -a http-basic.repo.magento.com ${MAGENTO_COMPOSER_AUTH_USER} ${MAGENTO_COMPOSER_AUTH_PASS} &&
composer create-project --no-interaction --no-progress --repository-url=https://mirror.mage-os.org/ magento/project-community-edition=${MAGENTO_VERSION} magento2 &&
cd magento2 && cp -avr .* $GITPOD_REPO_ROOT;
cd $GITPOD_REPO_ROOT && rm -r -f magento2 && git checkout -- .gitignore;
command: sudo sed -i 's#$GITPOD_REPO_ROOT#'$GITPOD_REPO_ROOT'#g' /etc/nginx/nginx.conf &&
sudo sed -i 's#$GITPOD_REPO_ROOT#'$GITPOD_REPO_ROOT'#g' /etc/supervisor/conf.d/sp-php-fpm.conf &&
sudo sed -i 's#$PHP_VERSION#'$PHP_VERSION'#g' /etc/supervisor/conf.d/sp-php-fpm.conf &&
sudo cp $GITPOD_REPO_ROOT/gitpod/sp-redis.conf /etc/supervisor/conf.d/redis.conf &&
sudo cp $GITPOD_REPO_ROOT/gitpod/sp-elasticsearch.conf /etc/supervisor/conf.d/elasticsearch.conf &&
sudo sed -i 's/^\(\[supervisord\]\)$/\1\nnodaemon=true/' /etc/supervisor/supervisord.conf &&
service nginx start &
sudo mv /var/lib/mysql $GITPOD_REPO_ROOT/;
sed -i 's#/var/lib/mysql#'$GITPOD_REPO_ROOT'/mysql#g' /etc/mysql/conf.d/mysqld.cnf;
sudo sed -i 's#/var/lib/mysql#'$GITPOD_REPO_ROOT'/mysql#g' /etc/supervisor/conf.d/mysql.conf;
sudo /etc/init.d/supervisor start & \ ;
test ! -f $GITPOD_REPO_ROOT/gitpod/db-installed.flag && $GITPOD_REPO_ROOT/gitpod/m2-install.sh;
url=$(gp url | awk -F"//" {'print $2'}) && url="https://8002-"$url"/";
php bin/magento config:set web/unsecure/base_url $url;
php bin/magento config:set web/unsecure/base_link_url $url;
php bin/magento config:set web/secure/base_url $url;