-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,61 @@ | ||
# Docker Container Option | ||
# Docker Container Setup for Roots Bedrock | ||
|
||
Setup to use on Raspberry Pi or Linux Environment with Docker available where Limactl is not needed | ||
This setup is designed to run Roots Bedrock on Docker with PHP, Node, MariaDB, and additional tools like WP-CLI. | ||
|
||
1. Copy the `.env` in this directory into the `site/` directory. | ||
2. Enter the `container` directory and up the Docker Compose setup (`docker-compose up -d`). | ||
## Prerequisites | ||
|
||
- Docker | ||
- Docker Compose | ||
|
||
## Setup Instructions | ||
|
||
1. Copy the `.env` file in this directory into the `site/` directory. | ||
2. Navigate to the `container` directory. | ||
3. Build and start the Docker Compose setup: | ||
```sh | ||
docker-compose up -d | ||
``` | ||
|
||
## Services | ||
|
||
- **PHP**: PHP 8.3 with FPM, Composer, and WP-CLI. | ||
- **Nginx**: Nginx 1.19.2 serving the Bedrock application. | ||
- **MariaDB**: MariaDB 10.5 for the database. | ||
- **Node**: Node.js with Volta for managing Node, npm, and Yarn versions. | ||
|
||
## Volumes | ||
|
||
- `node_binaries`: Mounted as read-only to `/usr/local/node`. | ||
- `volta_home`: Mounted as read-only to `/usr/local/volta`. | ||
|
||
## Networks | ||
|
||
- `app-network`: A bridge network for inter-service communication. | ||
|
||
## Additional Tools | ||
|
||
- **WP-CLI**: Installed in the PHP container for managing WordPress from the command line. | ||
- **Composer**: Installed in the PHP container for managing PHP dependencies. | ||
- **Git**: Installed in the PHP container for version control. | ||
|
||
## Usage | ||
|
||
- To access the PHP container: | ||
```sh | ||
docker-compose exec php bash | ||
``` | ||
- To access the Node container: | ||
```sh | ||
docker-compose exec node bash | ||
``` | ||
- To access the MariaDB container: | ||
```sh | ||
docker-compose exec db bash | ||
``` | ||
|
||
## Clean Up | ||
|
||
To stop and remove all containers, networks, and volumes: | ||
```sh | ||
docker-compose down -v | ||
``` |