-
Run
yarn install
to install the project dependencies -
Setup the environment variables
cd ./packages/react-app && cp .env.example .env
-
To enable Google authentication, you need to fill the following environment variables in your
.env
file:VITE_GOOGLE_OAUTH_CLIENT_ID
: your Google OAuth Client IDVITE_GOOGLE_OAUTH_CLIENT_SECRET
: your Google OAuth Client SecretVITE_GOOGLE_OAUTH_REDIRECT
: your Google OAuth Redirect URI
-
Update the
VITE_FRONTEND_URI
value. Replacelocalhost
with the domain hosting the React application -
Setup and run the API, or update the
VITE_API_URI
variable to a publicly accessible address. Refer to the documentation for instructions on local setup -
Run
yarn start-react-app
to start the APP
-
Build docker image
docker build -f ./packages/react-app/react.Dockerfile -t luckydart .
-
Run a container
docker run -p 8080:8080 luckydart
Helpful commands:
- Stop the container:
docker stop <container-id>
- Start existing container:
docker start <container-id>
- List running containers:
docker ps
-
Make sure you have the flyctl: a command line tool to work with Fly.io https://fly.io/docs/hands-on/install-flyctl/
-
Deploy the app
fly deploy --config fly.react.toml --dockerfile packages/react-app/react.Dockerfile .
Helpful commands:
-
Add a secret
fly --config fly.react.toml secrets set key=value
-
Check secrets and env variables
fly --config fly.react.toml secrets list
fly --config fly.react.toml config env
-
Check app status and vms
fly --config fly.react.toml status
-
Check app services
fly services list -a luckydart
Monitor the app: https://fly.io/apps/luckydart/monitoring