Skip to content

Commit a764759

Browse files
authored
Merge pull request #323 from Shopify/sle-c/shopify-env
Fixes init process for Shopify environment
2 parents 8ff4648 + 3354f74 commit a764759

1 file changed

Lines changed: 36 additions & 2 deletions

File tree

dev.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
11
name: shopify-php-api
22
up:
3-
- homebrew:
4-
- composer
3+
- custom:
4+
name: Add apt repository for php
5+
met?: test -f /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
6+
meet: sudo add-apt-repository -y ppa:ondrej/php
7+
- custom:
8+
name: Update apt
9+
met?: 'apt-get update | grep -q "Reading package lists..."'
10+
meet: sudo apt-get update
11+
- custom:
12+
name: Install PHP 8.2
13+
met?: 'dpkg -l | grep -q "php8.2"'
14+
meet: sudo apt-get install -y php8.2 libapache2-mod-php8.2 php8.2-cli php8.2-xml php8.2-cgi php8.2-zip
15+
- custom:
16+
name: Configure Ubuntu to use PHP 8.2
17+
met?: 'php -v | grep -q "8.2"'
18+
meet: sudo update-alternatives --set php /usr/bin/php8.2
19+
- custom:
20+
name: Configure Apache to use PHP 8.2
21+
met?: test -f /etc/apache2/mods-enabled/php8.2.conf
22+
meet: sudo a2dismod php8.1 && sudo a2enmod php8.2
23+
- custom:
24+
name: Configure ServerName in Apache2
25+
met?: 'grep -q "ServerName 127.0.0.1" /etc/apache2/apache2.conf'
26+
meet: echo "ServerName 127.0.0.1" | sudo tee -a
27+
- custom:
28+
name: Change Apache2 default port from 80 to 8123
29+
met?: 'grep -q "Listen 8123" /etc/apache2/ports.conf'
30+
meet: sudo sed -i 's/Listen 80/Listen 8123/' /etc/apache2/ports.conf
31+
- custom:
32+
name: Restart Apache2
33+
met?: 'systemctl is-active --quiet apache2'
34+
meet: sudo systemctl restart apache2
35+
- custom:
36+
name: Install composer
37+
met?: 'which composer'
38+
meet: curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
539
- custom:
640
name: Composer install
741
met?: 'composer install --dry-run 2>&1 | grep -q "Nothing to install"'

0 commit comments

Comments
 (0)