Setup FNDTN project
Github
Section titled “Github”- Create a Github repo from the
Foundation
template with the name{{ projectName }}
.
Go to FNDTN repo on Github
Automatic via CLI
Section titled “Automatic via CLI”There is an automatic CLI tool: foundation-cli
.
Checkout repo and install tool
This tool uses a combination of different CLI tools. Please make sure you have
the gh
CLI enabled and authorized. In 1Password you can find secrets
(Foundation Starter) and the Rootnet API password.
- Run:
foundation create-aws-bucket
- See the Rootnet steps below for creating projects on Rootnet (this is no longer automatic because of 2FA).
- Enable Deployment Tools > Github CI/CD for both projects.
- Run:
foundation generate ssh
- Copy the public key from servers (web and CMS):
cat ~/.ssh/id_rsa.pub
- Add this key to Rootnet > Deployment Tools > SSH keys for tools for both projects.
- Run:
foundation setup-cms-server
- Run:
foundation setup-web-server
Rootnet setup
Section titled “Rootnet setup”Staging
Section titled “Staging”- Create Rootnet staging projects for web and CMS.
- Staging servers are on Wispy Stork.
- Create a Strapi project:
- Name:
{{ projectName }} - Staging - CMS
- Template: Strapi + MySQL + PM2
- Server: wispy-stork
- You’ll receive credentials by email. Store them in 1Password under
{{ projectName }} Staging
. - Go to: Toegang > Rollen toevoegen > check Beheerder and save.
- Enable Github CI/CD via deployment tools.
- Add domain:
staging.cms.{{ projectName }}.ef2.builders
- Name:
- Create a NextJS project:
- Name:
{{ projectName }} - Staging - Web
- Template: Next.js
- Server: wispy-stork
- You’ll receive another email with info. Store this in 1Password (same note as above).
- Enable Github CI/CD via deployment tools.
- Add domain:
staging.web.{{ projectName }}.ef2.builders
- Name:
Production
Section titled “Production”- Create Rootnet production projects for web and CMS.
- Production servers are on Naval Wolf.
- Create a Strapi project:
- Name:
{{ projectName }} - Production - CMS
- Template: Strapi + MySQL + PM2
- Server: naval-wolf
- You’ll receive credentials by email. Store them in 1Password under
{{ projectName }} Production
. - Go to: Toegang > Rollen toevoegen > check Beheerder and save.
- Enable Github CI/CD via deployment tools.
- Add domain:
cms.{{ projectName }}.ef2.builders
- Name:
- Create a NextJS project:
- Name:
{{ projectName }} - Production - Web
- Template: Next.js
- Server: naval-wolf
- You’ll receive another email with info. Store this in 1Password (same note as above).
- Enable Github CI/CD via deployment tools.
- Add domain:
web.{{ projectName }}.ef2.builders
- Name:
Troubleshooting
Section titled “Troubleshooting”- It is possible that the
main
branch is missing. In that case go to the Github repo, and create the branch in/branches
- It is possible that the
production
environment is missing from environments. Check Github repo >/settings/environments
and addproduction
if needed. Otherwise it’s not possible to store envs
Done setting up?
Section titled “Done setting up?”If you’re done setting up an environment and it works on your local machine,
save the .env
from the root in 1Password named:
{{projectName}} - Local .env
.