-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
9 changed files
with
133 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
DB_NAME=wordpress | ||
DB_USER=wordpress | ||
DB_PASSWORD=password | ||
DB_HOST=database | ||
DB_PREFIX=wp_ | ||
|
||
WP_ENV=development | ||
WP_HOME=http://localhost:8080 | ||
WP_SITEURL=${WP_HOME}/wp | ||
|
||
# Generate your keys here: https://roots.io/salts.html | ||
AUTH_KEY='generateme' | ||
SECURE_AUTH_KEY='generateme' | ||
LOGGED_IN_KEY='generateme' | ||
NONCE_KEY='generateme' | ||
AUTH_SALT='generateme' | ||
SECURE_AUTH_SALT='generateme' | ||
LOGGED_IN_SALT='generateme' | ||
NONCE_SALT='generateme' |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker-compose.override.yml | ||
.env |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM php:8.1-fpm | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
mariadb-client \ | ||
zip \ | ||
unzip \ | ||
&& docker-php-ext-install -j$(nproc) \ | ||
mysqli \ | ||
pdo_mysql \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \ | ||
&& chmod +x wp-cli.phar \ | ||
&& mv wp-cli.phar /usr/local/bin/wp | ||
|
||
WORKDIR /roots/app |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
server { | ||
listen 80; | ||
root /roots/app/web; | ||
index index.php; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php$is_args$args; | ||
} | ||
|
||
location ~ \.php$ { | ||
fastcgi_pass app:9000; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
include fastcgi_params; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
memory_limit = 256M | ||
max_execution_time = 120 | ||
upload_max_filesize = 64M | ||
post_max_size = 64M | ||
error_reporting = E_ALL | ||
display_errors = Off | ||
log_errors = On |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "Bedrock Development", | ||
"dockerComposeFile": ["docker-compose.yml"], | ||
"service": "app", | ||
"workspaceFolder": "/roots/app", | ||
"forwardPorts": [8080], | ||
"remoteEnv": { | ||
"WP_ENV": "development" | ||
}, | ||
"postCreateCommand": "cp -n /roots/app/.devcontainer/.env.example /roots/app/.env" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
volumes: | ||
- ..:/roots/app | ||
- ./config/php.ini:/usr/local/etc/php/conf.d/bedrock.ini | ||
networks: | ||
- bedrock | ||
depends_on: | ||
- database | ||
|
||
web: | ||
image: nginx:alpine | ||
ports: | ||
- '8080:80' | ||
volumes: | ||
- ..:/roots/app:ro | ||
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf:ro | ||
depends_on: | ||
- app | ||
networks: | ||
- bedrock | ||
|
||
database: | ||
image: mariadb:10 | ||
environment: | ||
MYSQL_DATABASE: wordpress | ||
MYSQL_USER: wordpress | ||
MYSQL_PASSWORD: password | ||
MYSQL_ROOT_PASSWORD: password | ||
networks: | ||
- bedrock | ||
|
||
networks: | ||
bedrock: | ||
driver: bridge |
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,4 +1,4 @@ | ||
/.circleci export-ignore | ||
/.editorconfig export-ignore | ||
/.devcontainer export-ignore | ||
/.gitattributes export-ignore | ||
/.github export-ignore |
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 |
---|---|---|
|
@@ -3,23 +3,26 @@ name: Integration | |
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
build: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: roots/bedrock-docker | ||
ref: main | ||
path: bedrock-docker | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: bedrock-docker/bedrock | ||
- name: Build and run | ||
run: docker compose up --build -d | ||
working-directory: bedrock-docker | ||
- name: Wait for install | ||
run: sleep 30 | ||
working-directory: bedrock-docker | ||
- name: Verify install | ||
run: curl -s http://127.0.0.1 | grep "<title>bedrock" | ||
working-directory: bedrock-docker | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Copy .env file | ||
working-directory: .devcontainer | ||
run: cp .env.example ../.env | ||
|
||
- name: Start dev container and test | ||
uses: devcontainers/[email protected] | ||
with: | ||
configFile: .devcontainer/devcontainer.json | ||
runCmd: | | ||
composer install | ||
while ! mysqladmin ping -h"database" --silent; do | ||
sleep 1 | ||
done | ||
wp core install --url=http://localhost:8080 --title=Bedrock --admin_user=admin --admin_password=admin [email protected] --skip-email --allow-root | ||
- name: Verify installation | ||
run: | | ||
curl -s http://localhost:8080 | grep "<title>Bedrock" |