How I can specify variables for my appspec.yml?

36 Views Asked by At

In my appspec.yml:

version: 0.0
os: linux
files:
  - source: /
    destination: ${WWW_PATH}
hooks:
  BeforeInstall:
    - command: cd ${WWW_PATH}
      runas: root
    - command: php artisan down
      timeout: 300
      runas: www-data
    # @TODO DIsable Vhost
    - command: service nginx down
      runas: root
### Extra stuff

I want to set parameters such as WWW_PATH that indicates in which folder the app will be deployed upon. But in the web console how I can configure that in my deployment group?

The goal is to have a "generic" appspec.yml and re-use it in multiple deployments in similar environments. Is there a way to do that?

1

There are 1 best solutions below

0
Caldazar On

appspec.yml file is part of your repository, you cannot define it in the console. Since it's part of your code repository, you could add additional steps to the build process and update the values needed (you could use bash command sed to update values in the file)