Skip to content

Latest commit

 

History

History
103 lines (58 loc) · 3.61 KB

GettingStarted.md

File metadata and controls

103 lines (58 loc) · 3.61 KB

Overview

All instructions below are tested to work for:

  • MacOS
  • Windows

Getting started for development

  1. Clone this repo locally. git clone https://github.com/flexport/flexport-earth.git

  2. Fork this repo. in github click the fork icon in the upper right.

  3. cd flexport-earth

  4. Update your remotes replacing with your github username:

    git remote set-url --push origin https://github.com/<your-username-here>/flexport-earth.git

Note:

Your commits must be be verified to be merged to the main branch.

System Dependencies

If running on Windows, install the Windows Subsystem for Linux first.

  1. PowerShell Core (7.3.1)

    If you get the following message " can’t be opened because Apple cannot check it for malicious software." please do the following: Open System Settings in the left hand nav select "Privacy & Security" in the right hand section scroll down to the Security section. there will be an entry for was blocked from use because it is not from an identified developer. click open Anyway enter login credentials. click Open. installer should now run

  2. Azure CLI (2.44.0)

  3. NodeJS (16.15.0)

  4. Docker (version 20.10.21)

Start a PowerShell Console

pwsh

Building a Release

./dev BuildRelease

Note: This will also execute the unit and component tests.

Viewing Website Content Locally

The NextJS frontend can be started in dev mode by running:

./dev StartWebsiteLocallyDevMode

The NextJS frontend can be started in production mode by running:

./dev StartWebsiteLocallyProdMode

Execute End to End Tests Locally

./dev RunE2ETests

Note: Will need to open a new terminal window for this after starting the website locally.

Google Analytics

You can optionally use / test Google Analytics in your personal development environment.

First you will need to create your own presonal Google Analytics account, see here for how to do that.

Then configure your Google Analytics Measurement ID in your local configuration.

If this is your first time running Earth, simply executing any of the development scripts will prompt you for this (and other configuration settings) at which point you can input this ID.

If you've previously executed Earth, then you can set the value in your local configuration.

Azure

You'll need an Azure subscription to deploy to. Once you have one, you can follow the steps below.

For provisioning new Azure Accounts, Tenants, and Subscriptions, continue here.

Deploy your locally built changes to Azure

./dev DeployToAzure

Clean up your Azure deployment

./dev DestroyAzureEnvironment

Pushing Changes to GitHub

Once you've made some changes and committed them, you can push them remotely using the push script:

./dev Push

Developing for Earth

Continue reading here on how to develop for Flexport Earth.