Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
feat: example for native type
Browse files Browse the repository at this point in the history
  • Loading branch information
saitho committed May 3, 2020
1 parent 3bf8f9c commit c3bb649
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .stackhead/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ all:
applications: # select one of the applications below for deployment
#- example_container_single
#- example_container_multi
#- example_native
# for "example_native" application uncomment the capabilities section below and reprovision the server
#capabilities:
# php:
# version: 7.3
9 changes: 9 additions & 0 deletions .stackhead/project/example_native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
domain: mydomain.com
deployment:
type: native
settings:
public_path: html
capabilities:
php:
version: 7.3
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ The provisioning and deployment part is the same regardless of the example you w
./vendor/getstackhead/stackhead/validation/bin/project-validator .stackhead/project/example_container_multi.yml
```

#### Native application

1. Adjust your inventory configuration in `.stackhead/inventory.yml`
1. Change the IP address in `ansible_host` to your own servers IP in `.stackhead/inventory.yml`
2. Uncomment the line "- example_native" in `applications` section
3. Uncomment the whole `capabilities` section below `applications`

2. Adjust the project settings in `.stackhead/project/example_native.yml`
1. Set your own domain in `domain`

3. Validate your project file using the `project-validator` binary:
```shell script
./vendor/getstackhead/stackhead/validation/bin/project-validator .stackhead/project/example_native.yml
```

### Server provisioning

```shell script
Expand All @@ -73,4 +88,7 @@ ansible-playbook vendor/getstackhead/stackhead/ansible/application-deploy.yml
```

After deployment, open the domain in your web browser.
You should see a page that prints "Hello world!" alongside the PHP version and successful database connection.

If you deployed a container-typed project, you should see a page that prints "Hello world!" alongside the PHP version and successful database connection.

If you deployed a native-typed project, you should see "This website was provisioned by StackHead." on the website.

0 comments on commit c3bb649

Please sign in to comment.