Skip to content

Commit

Permalink
Basic dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Jun 4, 2019
1 parent 45940e0 commit fc12bd6
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
/.vagrant/
10 changes: 10 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Local dev environment https://github.com/wpsh/wpsh-local

Vagrant.configure(2) do |config|
config.vm.hostname = "signinwithapple"
end

load File.join(
File.dirname(__FILE__),
'vendor/wpsh/local/Vagrantfile'
)
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@
"php": ">=5.6"
},
"require-dev": {
"wp-coding-standards/wpcs": "^2.1"
"wp-coding-standards/wpcs": "^2.1",
"wpsh/local": "^0.2.2"
},
"autoload": {
"psr-4": {
"\\WPSH\\SignInWithApplePlugin\\": "src/"
}
},
"config": {
"platform": {
"php": "5.6"
}
},
"scripts": {
"lint": [
"phpcs ."
]
},
"config": {
"autoloader-suffix": "WPSHSignInWithApplePlugin",
"platform": {
"php": "5.6"
}
}
}
24 changes: 23 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: '3'

services:

mysql:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
MYSQL_ROOT_PASSWORD: wordpress

wordpress:
image: wordpress:latest
depends_on:
- mysql
ports:
- "80:80"
- "443:443"
volumes:
- wp_data:/var/www/html
- ".:/var/www/html/wp-content/plugins/signin-with-apple:ro" # Without "ro" flags it can't access the directory.
restart: always
environment:
WORDPRESS_DEBUG: 1

wpcli:
image: wordpress:cli
depends_on:
- mysql
- wordpress
volumes:
- wp_data:/var/www/html
command: wp core install --url=signinwithapple.local --title="Sign In with Apple Plugin" --admin_user=admin --admin_password=password --admin_email=admin@example.com --path=/var/www/html

volumes:
db_data: {}
wp_data: {}

0 comments on commit fc12bd6

Please sign in to comment.