Skip to content

Commit

Permalink
docker container readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
jasperf committed Dec 26, 2024
1 parent 68d56ce commit 9e163bf
Showing 1 changed file with 59 additions and 4 deletions.
63 changes: 59 additions & 4 deletions container/README.md
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
```

0 comments on commit 9e163bf

Please sign in to comment.