-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitpod.yml
101 lines (74 loc) · 3.23 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# https://www.gitpod.io/docs/configure/workspaces/workspace-image#workspace-image
image:
file: .gitpod.Dockerfile
# image: gitpod/workspace-mysql
# https://www.gitpod.io/docs/configure/authentication/github#github
github:
prebuilds: true
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
tasks:
- name: Initialization
init: |
echo 'export PATH="/home/linuxbrew/.linuxbrew/opt/[email protected]/bin:$PATH"' >> /home/gitpod/.bash_profile
echo 'export PATH="/home/linuxbrew/.linuxbrew/opt/[email protected]/sbin:$PATH"' >> /home/gitpod/.bash_profile
wp package install aaemnnosttv/wp-cli-dotenv-command:^2.0
# Install project
composer create-project roots/bedrock tmp
cat tmp/README.md >> README.md && mv -f README.md tmp/README.md
cat tmp/.gitignore >> .gitignore && mv -f .gitignore tmp/.gitignore
cp -f -r tmp/. . && rm -rf -r tmp
# Config the installation
wp dotenv salts regenerate
wp dotenv set DB_NAME wordpress
wp dotenv set DB_USER root
wp dotenv set DB_HOST 0.0.0.0
sed -i "s/DB_PASSWORD=.*/DB_PASSWORD=/g" .env
wp dotenv set WP_HOME $(gp url 8080)
# Create the database
wp db create
# Launch the installation
wp core install --url=$(gp url 8080) --title="Wordpress on GitPod" --admin_user="root" --admin_password="root" --admin_email="[email protected]" --skip-email
# Install project deps
composer require andriilive/wp-disable-generated-image-sizes andriilive/wp-cli-media-regenerate-svg-fix roots/soil
# lukasbesch/bedrock-plugin-disabler
wp option update blogdescription "Roots bedrock wordpress on GitPod by by DigitalAndy.eu"
# wp post create --post_type=post --post_title='Wellcome' --post_status=publish --post_content=cat README.md
# Create db folder
mkdir .db
wp db export --add-drop-table .db/db.sql
command: gp sync-done init && wp server --host=0.0.0.0 --port=8080
- init: |
gp sync-await init
mkdir .utils
touch .utils/phpinfo.php && echo '<?php phpinfo();' >> .utils/phpinfo.php
chmod 640 .utils/phpinfo.php
wget https://github.com/vrana/adminer/releases/download/v4.8.1/editor-4.8.1-en.php -O .utils/adminer.php
chmod 640 .utils/adminer.php
# Create utils
touch .utils/phpinfo.php && echo '<?php phpinfo();' >> .utils/phpinfo.php
chmod 640 .utils/phpinfo.php
echo "wp/web: $(gp url 8080)"
echo "wp/admin: $(gp url 8080)/wp/wp-login.php"
echo "wp/user:"
echo "username: root"
echo "password: root"
echo "wp/env:"
wp dotenv list
echo "--------------------------------------"
echo "utils/phpinfo: $(gp url 3333)/phpinfo.php"
echo "utils/adminer: $(gp url 3333)/adminer.php"
echo "https://mailtrap.io/signin"
echo "--------------------------------------"
git remote -v
echo "--------------------------------------"
gp info
command: php -S 0.0.0.0:3333 -t .utils
ports:
- port: 3306
onOpen: ignore
- port: 33060
onOpen: ignore
- port: 8080
onOpen: open-browser
- port: 3333
onOpen: ignore