Skip to content

Commit

Permalink
Merge pull request #2720 from Varying-Vagrant-Vagrants/develop
Browse files Browse the repository at this point in the history
v3.1.2 stable
  • Loading branch information
tomjn authored Jul 19, 2024
2 parents f3ef893 + f350fe2 commit e0dad5d
Show file tree
Hide file tree
Showing 8 changed files with 134 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/vvv-provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Create Vagrant Like Environment
run: |
# uninstall pre installed packages (to test if extensions work)
sudo apt-get -q --autoremove --purge remove php*
sudo apt-get -q --autoremove --purge remove php* mysql*
sudo apt-get -q autoclean
# remove pre-installed composer
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ permalink: /docs/en-US/changelog/

# Changelog

## 3.13.2 ( 2024 July 19th )

### Enhancements

* VVV now shows a missing dashboard page with help when `www/default/index.php` is accidentally deleted instead of a HTTP forbidden error ( #2714 )

### Bug Fixes

* VVV will check if Docker is installed before defaulting to it on Arm64/Apple Silicon ( #2715 )
* Fixed MySQL issues in GitHub Actions ( #2716 )

## 3.13.1 ( 2024 June 16th )

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/206b06167aaf48aab24422cd417e8afa)](https://www.codacy.com/gh/Varying-Vagrant-Vagrants/VVV?utm_source=github.com&utm_medium=referral&utm_content=Varying-Vagrant-Vagrants/VVV&utm_campaign=Badge_Grade) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/varying-vagrant-vagrants/vvv.svg)](http://isitmaintained.com/project/varying-vagrant-vagrants/vvv "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/varying-vagrant-vagrants/vvv.svg)](http://isitmaintained.com/project/varying-vagrant-vagrants/vvv "Percentage of issues still open")

VVV is a local developer environment, mainly aimed at [WordPress](https://wordpress.org) developers. It uses [Vagrant](https://www.vagrantup.com) and VirtualBox/Parallels/HyperV to create a linux server environment for building sites, and contributing to WordPress itself.
VVV is a local developer environment, mainly aimed at [WordPress](https://wordpress.org) developers. It uses [Vagrant](https://www.vagrantup.com) and Docker/VirtualBox/Parallels/HyperV to create a linux server environment for building sites, and contributing to WordPress itself.

_VVV stands for Varying Vagrant Vagrants._

Expand Down
23 changes: 19 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ def sudo_warnings
# exit
end


def vvv_is_docker_present()
if `docker version`
return true
end
end

def vvv_is_parallels_present()
return Vagrant.has_plugin?("vagrant-parallels")
end

vagrant_dir = __dir__
show_logo = false
branch_c = "\033[38;5;6m" # 111m"
Expand Down Expand Up @@ -214,12 +225,16 @@ vvv_config['general'] = {} unless vvv_config['general'].is_a? Hash

defaults = {}
defaults['memory'] = 2048
defaults['cores'] = 1
defaults['cores'] = 2
defaults['provider'] = 'virtualbox'

# if Arm default to docker
# if Arm default to docker then parallels
if Etc.uname[:version].include? 'ARM64'
defaults['provider'] = 'docker'
if vvv_is_docker_present()
defaults['provider'] = 'docker'
else
defaults['provider'] = 'parallels'
end
end

# This should rarely be overridden, so it's not included in the config/default-config.yml file.
Expand Down Expand Up @@ -329,7 +344,7 @@ if show_logo
when 'hyperv'
provider_version = 'n/a'
when 'docker'
provider_version = VagrantPlugins::DockerProvider::Driver.new.execute("docker", "-v").gsub("Docker version ", "")
provider_version = `docker -v`.gsub("Docker version ", "")
else
provider_version = '??'
end
Expand Down
9 changes: 8 additions & 1 deletion provision/core/nginx/config/sites/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@ server {
root /usr/share/nginx/html;
}

location = /nodashboard.html {
ssi on;
internal;
auth_basic off;
root /usr/share/nginx/html;
}

include /etc/nginx/custom-dashboard-extensions/*.conf;

location / {
index index.php;
index index.php /nodashboard.html;
try_files $uri $uri/ /index.php$is_args$args;
}

Expand Down
88 changes: 88 additions & 0 deletions provision/core/nginx/default-pages/nodashboard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dashboard file missings</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body {
height: 100%;
}
body {
width: 90%;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
background-color: #2b303b;
display: flex;
justify-content: center;
align-items: center;
align-content : center;
color: #c0c5ce;
height:100%;
}
pre, code {
background: #2b303b;
border-radius: 4px;
border: 1px solid #4f5b66;
}
code {
color: #a3be8c;
padding: .1em .2em;
}
main {
display: flex;
border-radius: 4px;
padding: 1.5em;
box-sizing: border-box;
margin: 1em 20px;
max-width: 800px;
}
.right {
align-self: center;
font-size:120px;
padding-left:60px;
}
h1 {
color:white;
}
a {
color: #ebcb8b;
background: #ebcb8b11;
}
a:hover {
background: #ebcb8b;
color: #ebcb8b11;
}
a:focus, a:active {
color: magenta;
}
@media only screen and (max-width: 601px) {
main {
flex-direction: column;
margin: 1em 0;
padding: 0;
}
.right {
order: 0;
padding-left: 0;
}
.left {
order: 1;
}
}
</style>
</head>
<body>
<main>
<div class="left">
<h1>The Dashboard Loader file is missing!</h1>
<p>It looks like <code>www/default/index.php</code> is missing!</p>
<p>This file and the <code>www/default</code> folder are needed for dashboard and other parts of VVV to function. This includes tools such as xdebug info/phpmyadmin/etc.</p>
<p><strong>You can fix this and restore the <code>www/default</code> folder with <code>git checkout www/default</code>.</strong></p>
</div>
<div class="right">
🚩
</div>
</main>
</body>
</html>
5 changes: 5 additions & 0 deletions provision/provision-dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ REPO=$1
BRANCH=${2:-master}
DIR="/srv/www/default/dashboard"

if [[ ! -f /srv/www/default/index.php ]]; then
vvv_warn " ! The dashboard loader index.hp file is missing!"
vvv_warn " Without this neither the default or custom dashboard will load, and you will get a HTTP 401 forbidden message. If you deleted your www folder, restore the www/default folder to fix this, 'git checkout www/default' might fix this for you."
fi

if [[ false != "dashboard" && false != "${REPO}" ]]; then
noroot mkdir -p "${DIR}"
# Clone or pull the resources repository
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13.1
3.13.2

0 comments on commit e0dad5d

Please sign in to comment.