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

Commit

Permalink
Merge pull request #997 from oxyc/env-config-docs
Browse files Browse the repository at this point in the history
Issue #455: Add docs on environment specific configs
  • Loading branch information
geerlingguy committed Nov 17, 2016
2 parents 0c0a2b8 + 0200d42 commit 5e4dee8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/other/production.md
@@ -0,0 +1,34 @@
Drupal VM has _experimental_ support for deploying Drupal VM to a production environment. The security of your servers is _your_ responsibility.

For a configuration example and instructions on how to build a Drupal environment with Drupal VM on DigitalOcean see the [`examples/prod` directory and README](https://github.com/geerlingguy/drupal-vm/tree/master/examples/prod).

## Production specific overrides.

Drupal VM supports loading configuration files depending on the environment variable `DRUPALVM_ENV` and using this feature you can have different configurations between development and production environments.

```sh
# Loads vagrant.config.yml if available (default).
vagrant provision

# Loads prod.config.yml if available.
DRUPALVM_ENV=prod vagrant provision --provisioner=aws
```

If you're issuing a provision directly through `ansible-playbook` as you would do for most production environments you can either set the `DRUPALVM_ENV` variable on your host, or on the remote production machine.

```sh
# By default it doesn't try to load any other config file.
ansible-playbook -i examples/prod/inventory provisioning/playbook.yml --sudo --ask-sudo-pass

# Loads prod.config.yml if available.
DRUPALVM_ENV=prod ansible-playbook -i examples/prod/inventory provisioning/playbook.yml --sudo --ask-sudo-pass
```

If you add `DRUPALVM_ENV=prod` to the `/etc/environment` file on your production environment:

```sh
# Loads prod.config.yml if available.
ansible-playbook -i examples/prod/inventory provisioning/playbook.yml --sudo --ask-sudo-pass
```

_Note: Having the variable set locally takes precedence over having it on the remote machine._
1 change: 1 addition & 0 deletions mkdocs.yml
Expand Up @@ -43,6 +43,7 @@ pages:
- 'PHP 5.6 on Drupal VM': 'other/php-56.md'
- 'BigPipe with Drupal VM': 'other/bigpipe.md'
- 'Drupal VM Management Tools': 'other/management-tools.md'
- 'Deploying Drupal VM to a production environment': 'other/production.md'
- 'Networking Notes': 'other/networking.md'
- 'Drupal 6 Notes': 'other/drupal-6.md'
- 'Linux Notes': 'other/linux.md'
Expand Down

0 comments on commit 5e4dee8

Please sign in to comment.