Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override serverUrl in wasp deploy fly deploy command #2234

Merged
merged 6 commits into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading