Skip to content

Commit

Permalink
Override serverUrl in wasp deploy fly deploy command (#2234)
Browse files Browse the repository at this point in the history
  • Loading branch information
Case-E authored Sep 2, 2024
1 parent ccc652e commit 021cc31
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion waspc/packages/deploy/src/providers/fly/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,13 @@ async function deployClient(deploymentInfo: DeploymentInfo<DeployOptions>, { bui
copyProjectClientTomlLocally(deploymentInfo.tomlFilePaths);

waspSays('Building web client for production...');
waspSays('If you configured a custom domain for the server, you should run the command with an env variable: REACT_APP_API_URL=https://serverUrl.com wasp deploy fly deploy');

const serverUrl = process.env.REACT_APP_API_URL
? process.env.REACT_APP_API_URL
: deploymentInfo.serverUrl;
await $`npm install`;
await $`REACT_APP_API_URL=${deploymentInfo.serverUrl} npm run build`;
await $`REACT_APP_API_URL=${serverUrl} npm run build`;

// Creates the necessary Dockerfile for deploying static websites to Fly.io.
// Adds dummy .dockerignore to supress CLI question.
Expand Down

0 comments on commit 021cc31

Please sign in to comment.