Skip to content

Commit

Permalink
Update all examples [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
back-2-95 committed Apr 30, 2024
1 parent 47c5246 commit a325e77
Show file tree
Hide file tree
Showing 20 changed files with 82 additions and 41 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ stonehenge up

## SSH keys

By default Stonehenge tries to add key from `~/.ssh/id_ed25519` and `~/.ssh/id_rsa`.
By default, Stonehenge tries to add key from `~/.ssh/id_ed25519` and `~/.ssh/id_rsa`.

You can add additional SSH keys with:

Expand All @@ -115,8 +115,8 @@ HTTPS_PORT=8443 HTTP_PORT=8080 SMTP_PORT=25 make up
- [Drupal 10](https://github.com/druidfi/stonehenge/tree/5.x/examples/drupal)
- [Ghost 5](https://github.com/druidfi/stonehenge/tree/5.x/examples/ghost)
- [Hugo](https://github.com/druidfi/stonehenge/tree/5.x/examples/hugo)
- [Laravel 9](https://github.com/druidfi/stonehenge/tree/5.x/examples/laravel)
- [Symfony 6](https://github.com/druidfi/stonehenge/tree/5.x/examples/symfony)
- [Laravel 11](https://github.com/druidfi/stonehenge/tree/5.x/examples/laravel)
- [Symfony 7](https://github.com/druidfi/stonehenge/tree/5.x/examples/symfony)
- [Wordpress](https://github.com/druidfi/stonehenge/tree/5.x/examples/wordpress)

## Supported operating systems
Expand Down
Empty file removed examples/drupal/.env
Empty file.
1 change: 0 additions & 1 deletion examples/drupal/.gitignore

This file was deleted.

3 changes: 1 addition & 2 deletions examples/drupal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ EXECUTE := docker compose exec app
PHONY += up
up: ## Launch example
$(call step,Start $(DRUPAL_SITENAME) application...)
@docker compose up -d
@docker compose up --wait
$(call step,Install $(DRUPAL_SITENAME) with Drush...)
@$(EXECUTE) sudo chmod -R 0777 /app/public/sites/default/files
@echo "Wait for 5 seconds so database gets ready..." && sleep 5
@$(EXECUTE) drush -y site:install demo_umami --account-name="admin" --site-name="$(DRUPAL_SITENAME)"
$(call step,DONE! Open https://drupal.docker.so ... Also check for admin credentials ^^)

Expand Down
8 changes: 4 additions & 4 deletions examples/drupal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Install Drupal application with Composer:

```
```console
cd examples/drupal
make up
```
Expand All @@ -21,17 +21,17 @@ Access the site in https://drupal.docker.so/

Login to container:

```
```console
docker compose exec app bash
```

Then you can use e.g. Drush

## Teardown

You can teardown the whole example by:
You can tear down the whole example by:

```
```console
make down
```

Expand Down
19 changes: 15 additions & 4 deletions examples/drupal/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
services:

app:
hostname: drupal.docker.so
hostname: ${COMPOSE_PROJECT_NAME}
container_name: drupal-example-app
image: druidfi/drupal-test:php-8.2
image: druidfi/drupal-test:php-8.3
depends_on:
- db
db:
condition: service_healthy
environment:
APP_ENV: prod
DRUPAL_ROUTES: https://drupal.docker.so
Expand All @@ -23,7 +24,17 @@ services:

db:
container_name: drupal-example-db
image: druidfi/mariadb:10.11-drupal-lts
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot", "-pdrupal" ]
interval: 5s
timeout: 5s
retries: 3

networks:
stonehenge-network:
Expand Down
2 changes: 1 addition & 1 deletion examples/ghost/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include ../utils.mk
PHONY += up
up: ## Launch example Ghost application
$(call step,Start Ghost example application...)
@docker compose up -d
@docker compose up --wait
$(call step,DONE! Check https://ghost.docker.so ...)

PHONY += down
Expand Down
12 changes: 11 additions & 1 deletion examples/ghost/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Setup

```
```console
cd examples/ghost
make up
```
Expand All @@ -18,3 +18,13 @@ NOTE! It might take a few seconds to get Ghost to respond.
## Configure the installation

Go to https://ghost.docker.so/ghost/ and configure your Ghost instance.

## Teardown

You can tear down the whole example by:

```console
make down
```

This will put down the containers.
10 changes: 8 additions & 2 deletions examples/ghost/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ services:
image: ghost:5-alpine
container_name: ghost-example-app
depends_on:
- db
db:
condition: service_healthy
environment:
# see https://docs.ghost.org/docs/config#section-running-ghost-with-config-env-variables
database__client: mysql
Expand All @@ -30,10 +31,15 @@ services:
image: mysql:8.0
container_name: ghost-example-db
environment:
MYSQL_ROOT_PASSWORD: someghost
MYSQL_ROOT_PASSWORD: ghost
MYSQL_DATABASE: ghost
MYSQL_USER: ghost
MYSQL_PASSWORD: ghost
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot", "-pghost" ]
interval: 5s
timeout: 5s
retries: 3

networks:
stonehenge-network:
Expand Down
2 changes: 1 addition & 1 deletion examples/hugo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ endif
PHONY += up
up: site ## Launch example Hugo site
$(call step,Start Hugo example site...)
@docker compose up -d
@docker compose up --wait
$(call step,DONE! Check https://hugo.docker.so ...)

PHONY += site
Expand Down
14 changes: 12 additions & 2 deletions examples/hugo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Setup

```
```console
cd examples/hugo
make up
```
Expand All @@ -17,7 +17,7 @@ Access the site in https://hugo.docker.so/

Create a new post by:

```
```console
make hugo new posts/my-first-post.md
```

Expand All @@ -26,3 +26,13 @@ And see it: https://hugo.docker.so/posts/my-first-post
## Next steps

Go to https://gohugo.io/ and read how to manage your site.

## Teardown

You can tear down the whole example by:

```console
make down
```

This will put down the containers.
2 changes: 1 addition & 1 deletion examples/laravel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ app:
PHONY += up
up: app ## Launch example Laravel application
$(call colorecho,Start Laravel example application...)
@docker compose up -d
@docker compose up --wait
$(call step,DONE! Check https://laravel.docker.so ...)

PHONY += down
Expand Down
4 changes: 2 additions & 2 deletions examples/laravel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Install Laravel 9 application with Composer:

```
```console
cd examples/laravel
make up
```
Expand All @@ -21,7 +21,7 @@ Access the site in https://laravel.docker.so/

You can teardown the whole example by:

```
```console
make down
```

Expand Down
4 changes: 2 additions & 2 deletions examples/laravel/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:

app:
image: nginx:1.23-alpine
image: nginx:1.26-alpine
container_name: laravel-example-app
depends_on:
- php-fpm
Expand All @@ -21,7 +21,7 @@ services:
- stonehenge-network

php-fpm:
image: php:8.2-fpm-alpine
image: php:8.3-fpm-alpine
container_name: symfony-example-php-fpm
volumes:
- ./app:/app
Expand Down
4 changes: 2 additions & 2 deletions examples/symfony/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ include ../utils.mk

app:
$(call step,Create Symfony project to app folder)
@docker run --rm -it -v $(shell pwd):/app composer create-project symfony/symfony-demo app
@docker run --rm -it -v $(shell pwd):/app composer create-project symfony/skeleton:"7.0.*" app

PHONY += up
up: app ## Launch example Symfony application
$(call colorecho,Start Symfony example application...)
@docker compose up -d
@docker compose up --wait
$(call step,DONE! Check https://symfony.docker.so ...)

PHONY += down
Expand Down
6 changes: 3 additions & 3 deletions examples/symfony/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Install Symfony 6 application with Composer:

```
```console
cd examples/symfony
make up
```
Expand All @@ -19,9 +19,9 @@ Access the site in https://symfony.docker.so/

## Teardown

You can teardown the whole example by:
You can tear down the whole example by:

```
```console
make down
```

Expand Down
4 changes: 2 additions & 2 deletions examples/symfony/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:

app:
image: nginx:1.23-alpine
image: nginx:1.26-alpine
container_name: symfony-example-app
depends_on:
- php-fpm
Expand All @@ -21,7 +21,7 @@ services:
- stonehenge-network

php-fpm:
image: php:8.2-fpm-alpine
image: php:8.3-fpm-alpine
container_name: symfony-example-php-fpm
volumes:
- ./app:/app
Expand Down
2 changes: 1 addition & 1 deletion examples/wordpress/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WP_URL := https://wordpress.docker.so
PHONY += up
up: ## Launch example Wordpress site
$(call step,Start Wordpress example site...)
@docker compose up -d
@docker compose up --wait
@echo "Wait for 5 seconds so database gets ready..." && sleep 5
$(call step,DONE! Check https://wordpress.docker.so ...)

Expand Down
10 changes: 5 additions & 5 deletions examples/wordpress/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Wordpress example
# WordPress example

## Requirements

- druidfi/stonehenge up & running

## Setup

Install Wordpress site:
Install WordPress site:

```
```console
cd examples/wordpress
make up
```
Expand All @@ -17,9 +17,9 @@ Access the site in https://wordpress.docker.so/

## Teardown

You can teardown the whole example by:
You can tear down the whole example by:

```
```console
make down
```

Expand Down
10 changes: 8 additions & 2 deletions examples/wordpress/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ services:
image: wordpress:latest
container_name: "wordpress-example-app"
depends_on:
- db
db:
condition: service_healthy
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress
Expand All @@ -23,10 +24,15 @@ services:
image: mysql:8.0
container_name: "wordpress-example-db"
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot", "-pwordpress" ]
interval: 5s
timeout: 5s
retries: 3

networks:
stonehenge-network:
Expand Down

0 comments on commit a325e77

Please sign in to comment.