Skip to content
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

More detail on changing domain name #9

Open
jamesladd opened this issue Aug 1, 2020 · 1 comment
Open

More detail on changing domain name #9

jamesladd opened this issue Aug 1, 2020 · 1 comment

Comments

@jamesladd
Copy link

This is looking really good and its very fast to run. Thank you.

I followed the doc to make a .env file for each of my stages.
I'm also hoping to have a domain specific for the stage, like test.api.domain.com or api.test.domain.com but
this is causing certificate issues etc

A simple domain like mydomain.com works great, and I get a site at www.mydomain.com and an api at api.mydomain.com

Please can you provide more information / examples on customising the domain for different stages?

@eahefnawy
Copy link
Member

Have you tried the following?

# .env.dev
DOMAIN=dev.example.com
# .env.prod
DOMAIN=example.com
component: website
name: my-website

inputs:
  src: ./src
  domain: ${env:DOMAIN}

When you run sls deploy --stage dev, the .env.dev file will be picked up, when you run sls deploy --stage prod, the .env.prod will be picked up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants