1
votes

I have instance for beta sites and one for production. I set up CodeDeploy tool to deploy changes via Bitbucket UI to the server.

I know that there is an option to create additional deployment groups and set different instances for particular group. But my appspec.yml file stores destinations to beta site only destination: /var/www/html/beta-site.site.com.

Is there a best practice to set directories for specific group/instance?

1

1 Answers

1
votes

I found a solution for this issue. I created folders with aliases on prod and beta servers and updated appspec.yml paths accordingly:

On production server:

/var/www/html-aliases/site -> /var/www/html/site.com

On beta server:

/var/www/html-aliases/site -> /var/www/html/beta.site.com

So my appspec.yml configs looks like this now:

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html-aliases/site
permissions:
  - object: /var/www/html-aliases/site
    pattern: "**"
    owner: username
    group: www
    mode: 444
    type:
      - file
  - object: /var/www/html-aliases/site
    pattern: "**"
    owner: username
    group: www
    mode: 555
    type:
      - directory