1

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 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.