Open jamesladd opened 4 years ago
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.
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?