-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Deployer 7 Updates #2677
Docs: Deployer 7 Updates #2677
Changes from all commits
2ad3385
863c90e
91f3a0f
cf47283
c64308c
5b7ce67
ddd9f6e
745da1e
8fb7a50
da14dfb
66dede4
3088d4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,41 @@ | ||
# Config | ||
|
||
In the `config:` section of your `yaml` file you set all the required items to start deploying your application. It starts with `config:` following by the items in configuration in an indented list. Example | ||
|
||
```yml | ||
config: | ||
application: 'domain' | ||
``` | ||
|
||
All the options for configuration will be discussed below. | ||
|
||
## Application | ||
|
||
the name of your application is the first item to start with. The domain name of the application is a standard choice: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should go to recipe documentation in docs/recopes/common. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could move it over. Is there need to keep Deployer 6 and 7 settings for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, only v7 |
||
|
||
```yml | ||
application: 'domain' | ||
``` | ||
|
||
## Respository | ||
|
||
Using `repository` you can set the repository you would like to use for deployment. Example: | ||
|
||
```yml | ||
repository: 'git@github.com:user/domain.git' | ||
``` | ||
|
||
|
||
## Releases | ||
|
||
How many releases to keep can be set with `keep_releases`: | ||
|
||
```yml | ||
keep_releases: 10 | ||
``` | ||
|
||
## Shared Files | ||
|
||
``` | ||
shared_files: | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ One of: | |
- acl | ||
|
||
```php title="Default value" | ||
'chgrp' | ||
'acl' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct. |
||
``` | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Laravel PHP Yaml Example | ||
|
||
Here is an example `yaml` file for a Laravel PHP setup using the Laravel recipe `recipes/laravel.php` as well as PHP FPM & NPM from the `contrib` directory. The repository is a dummy one in this example, but all else is useful for most Laravel setups: | ||
|
||
```yml | ||
import: | ||
- recipe/laravel.php | ||
- contrib/php-fpm.php | ||
- contrib/npm.php | ||
|
||
config: | ||
application: 'domain' | ||
repository: 'git@github.com:user/domain.git' | ||
php_fpm_version: 7.4 | ||
keep_releases: 10 | ||
shared_files: | ||
- '.env' | ||
- '.transip_private_key' | ||
shared_dirs: | ||
- 'public/uploads' | ||
- 'public/published' | ||
- 'storage/logs' | ||
- 'storage/tls' | ||
- 'storage/app/public' | ||
- 'storage/app/modules' | ||
writable_dirs: | ||
- 'public/uploads' | ||
- 'public/published' | ||
- 'storage/framework/cache/data' | ||
- 'storage/logs' | ||
- 'storage/tls' | ||
- 'storage/app/public' | ||
- 'storage/app/modules' | ||
|
||
hosts: | ||
prod: | ||
remote_user: forge | ||
hostname: 'domain.com' | ||
deploy_path: '~/{{hostname}}' | ||
staging: | ||
remote_user: forge | ||
hostname: 'staging.domain.com' | ||
deploy_path: '~/{{hostname}}' | ||
|
||
tasks: | ||
deploy: | ||
- deploy:prepare | ||
- deploy:vendors | ||
- artisan:storage:link | ||
- artisan:view:cache | ||
- artisan:config:cache | ||
- artisan:migrate | ||
- npm:install | ||
- npm:run:prod | ||
- deploy:publish | ||
- php-fpm:reload | ||
npm:run:prod: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can add something like this somewhere : hosts:
prod:
remote_user: forge
hostname: 'domain.com'
deploy_path: '~/{{hostname}}'
labels:
npm_build_script: prod
staging:
remote_user: forge
hostname: 'staging.domain.com'
deploy_path: '~/{{hostname}}'
labels:
npm_build_script: dev
...
npm:run:dev:
select: 'npm_build_script=dev'
script:
- 'cd {{release_or_current_path}} && npm run dev'
npm:run:prod:
select: 'npm_build_script=prod'
script:
- 'cd {{release_or_current_path}} && npm run prod' hosts:
prod:
remote_user: forge
hostname: 'domain.com'
deploy_path: '~/{{hostname}}'
staging:
remote_user: forge
hostname: 'staging.domain.com'
deploy_path: '~/{{hostname}}'
...
npm:run:dev:
select: '__host__=prod'
script:
- 'cd {{release_or_current_path}} && npm run dev'
npm:run:prod:
select: '__host__=staging'
script:
- 'cd {{release_or_current_path}} && npm run prod' |
||
script: | ||
- 'cd {{release_or_current_path}} && npm run prod' | ||
|
||
after: | ||
deploy: | ||
- failed:deploy:unlock | ||
- artisan:horizon:terminate | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
# YAML | ||
|
||
TODO | ||
|
||
|
||
## General Example | ||
|
||
Here is a general yaml example for your average PHP application: | ||
|
||
``yml | ||
import: | ||
- | ||
|
||
config: | ||
application: 'domain' | ||
repository: 'git@github.com:user/domain.git' | ||
php_fpm_version: 7.4 | ||
keep_releases: 10 | ||
shared_files: | ||
- | ||
shared_dirs: | ||
- | ||
writable_dirs: | ||
- | ||
``` | ||
|
||
|
||
## Specific Examples | ||
|
||
[Laravel PHP Framework Example](yaml-examples/laravel-yaml.md) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is about configuration in general. Using get/set. Global config and hosts.