https://github.com/mlibrary/microsites-vagrant
https://github.com/mlibrary/microsites-vagrant
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/mlibrary/microsites-vagrant
- Owner: mlibrary
- Created: 2017-02-19T15:39:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-10-19T18:00:33.000Z (over 3 years ago)
- Last Synced: 2025-01-23T22:11:57.453Z (over 1 year ago)
- Language: Ruby
- Size: 34.2 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A vagrant configuration for running microsites locally. Filesystem syncing via unison is expected for vagrant. Experimental support for running under docker is available.
# Vagrant
## Prerequisites
1. vagrant
1. vagrant-triggers plugin
1. ansible
1. unison
1. ruby
## Installing a microsites vagrant host
1. Add microsites.local to your `/etc/hosts` file as `10.255.21.10`
1. `git clone https://github.com/mlibrary/microsites-vagrant`
1. `cd microsites-vagrant`
1. `vagrant up`
1. Follow instructions in `vagrant up` output to get an Oauth access token for https://box.it.umich.edu.
1. Create `.config` from `.config.EXAMPLE`.
# Docker
### Prerequisites
1. docker
1. ansible
1. ansible-container
1. ruby
### Instructions
1. Add microsites.local to your `/etc/hosts` file as `10.255.21.10`
1. `git clone https://github.com/mlibrary/microsites-vagrant`
1. `cd microsites-vagrant`
1. `docker network create --subnet 10.255.21.0/24 microsites`
1. `ansible-container build`
1.
docker \
run -itd \
--net microsites \
--ip 10.255.21.10 \
--name microsites \
-v "$PWD/microsites:/microsites" \
microsites-vagrant-web
7. `git clone https://github.com/mlibrary/microsites`
8. `(cd rb && bundle install --path .bundle)`
9. `bin/box setup`
10. `bin/wp-config`
11. Follow the instructions in `bin/box setup` output to get an Oauth access token for https://box.itd.umich.edu.
12. Create `.config` from `.config.EXAMPLE`.
## Starting with microsites' WordPress
1. Install a fresh database, or load a database with `bin/db import`
1. Visit at http://microsites.local/
## Importing and exporting a database from box
The database import depends on the `.config` file. Look at `.config.EXAMPLE`.
Use `bin/db import [db-file]` and `bin/db export [db-file]` to import and export a file respectively.
If a file name is not provided. The default is `$USER.microsites.sql.gz`.
## Updating wp core
bin/wp core update --minor=4.9