BCB now in Docker!
This repo consists of a docker-compose file and some supporting files required to bring up a local instance of BCB. When brought up, the running services include:
- WordPress 4.9.8
- Mysql 5.7
- Adminer (a web UI for MySQL)
The supporting files include:
- A submodule to fetch the current theme(NeoBCB21 theme).
- bcbwp.sql (not committed, contact @sathyabhat for this) - a database dump of the current BCB info
- update-data.sql which changes the site URL & homepage to localhost (probably can add more scripts to scrub PII)
- wp-config.php with some defaults.
This is designed only for dev, not for production. Weakness includes:
- Extremely stupid database username and password
- Salts in
wp-config.php
(change it as per instructions mentioned inwp-config.php
file)
-
Clone the repo: (see this Stack Overflow answer)
git clone --recurse-submodules --remote [email protected]:BarcampBangalore/bcb-docker.git
-
place
bcbwp.sql
file inmigration-scripts/
directory -
Start Compose
docker-compose up
-
Done!
BCB will be running on port 80, MySQL on port 3306 and Adminer on port 8080
- Compose brings up 3 containers, WordPress, MySQL & Adminer
- When MySQL is brought up, it runs the SQL files in
migration-scripts/
directory and the data is persisted to dbdata bind mount - When WordPress is brought up, it loads wp-config.php and wp-content via bind mounts