Closed jacqui closed 3 years ago
I've run into a problem at step one :( - I thought I knew all the places to specify the new unique name for the API stack, but apparently I've either missed one or done something wrong.
After giving new mongodb, project and S3 bucket names, my attempt to deploy a new API stack appears to have deployed a slightly modified version of the existing API stack.
14octa-contentapi
contentapi-tnc-1
± |new-client-setup {2} ?:9 ✗| → yarn webiny deploy api --env=prod
yarn run v1.22.5
$ /Users/jacqui/Projects/newscatalyst/review-webiny/new-tinynews-contentapi/node_modules/.bin/webiny deploy api --env=prod
💡 Loaded prod environment from
🎉 Done! Deploy finished in 209.132s.
I'm just going to file all my notes - progress or issues - here for now.
Here's what I'm trying as far as deploying a unique, new and separate API stack is concerned:
yarn
therelocal
environment and hopefully not see any reference to the old stack (14octa).--env=client1
)
This is a bit maddening and there's no documentation on how to deploy multiple webiny stacks - at least not that I've been able to find so far. If I get stuck I will ask about this in the webiny slack.
so far the deploying from a new directory where I have this repo cloned, in a new branch, with the various project/mongo/s3 names updated, seems to be working.
I did check the ENV
in my previous directory/checkout and there was nothing obvious at least. Interesting.
Just trying to sort out whether or not I'll need to maintain separate checkout of this content api repo for each tiny news client... doesn't seem ideal :-/ I'm thinking more about the 1 client == 1 env idea still.
Hooray, my test deploy in the local
env for what I'm calling client-1
succeeded:
This is the first deploy of local environment, so it may take a few minutes.
💡 Loaded local environment from <projectRoot>/.env.json.
💡 Loaded local environment from <projectRoot>/api/.env.json.
✔ Great! Your MongoDB is accessible.
webiny Collecting components from the template. +0ms
webiny Executing the template's components graph. +50ms
🎉 Done! Deploy finished in 403.849s.
🏁 Congratulations! You've just deployed your Webiny API stack for the first time.
⏳ Please note that CDN distribution takes some time to propagate, so allow ~10 minutes for it to become accessible.
Once your CDN is up, the following URLs will be available for you to use:
🔗 Main GraphQL API: https://d1jzodgk101b9j.cloudfront.net/graphql
🔗 CMS API:
- Content Delivery API: https://d1jzodgk101b9j.cloudfront.net/cms/read/production
- Content Preview API: https://d1jzodgk101b9j.cloudfront.net/cms/preview/production
To finish the system setup, you need to start your admin app and complete the installation wizard:
1) cd apps/admin
2) yarn start
After you finish the wizard, your system is ready for development.
To learn more about the admin app, visit https://docs.webiny.com/docs/webiny-apps/admin/introduction
✨ Done in 423.05s.
Next up: deploy admin.
Argh, immediately ran into trouble trying to deploy the admin stack to the local env:
± |client-trials/1 ✓| → yarn webiny deploy apps --env=local
yarn run v1.22.5
$ /Users/jacqui/Projects/newscatalyst/review-webiny/client-trials/client-1/node_modules/.bin/webiny deploy apps --env=local
This is the first deploy of local environment, so it may take a few minutes.
💡 Loaded local environment from <projectRoot>/.env.json.
✔ Great! Your MongoDB is accessible.
webiny Collecting components from the template. +0ms
webiny Executing the template's components graph. +44ms
error Command "build:ssr:local" not found.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Not sure what's going on ☝️ here but I'm investigating...
TBD: