Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
appflowy committed Dec 8, 2024
1 parent df42981 commit edb25f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/stress_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
POSTGRES_HOST: localhost
REDIS_HOST: localhost
POSTGRES_PASSWORD: password
MINIO_HOST: localhost
SQLX_OFFLINE: true
RUST_TOOLCHAIN: "1.78"

Expand Down Expand Up @@ -37,22 +38,10 @@ jobs:
sed -i '' 's|RUST_LOG=.*|RUST_LOG=trace|' .env
#Gotrue config:
sed -i '' 's|GOTRUE_SMTP_USER=.*|GOTRUE_SMTP_USER=${{ secrets.CI_GOTRUE_SMTP_USER }}|' .env
sed -i '' 's|GOTRUE_SMTP_PASS=.*|GOTRUE_SMTP_PASS=${{ secrets.CI_GOTRUE_SMTP_PASS }}|' .env
sed -i '' 's|GOTRUE_SMTP_ADMIN_EMAIL=.*|GOTRUE_SMTP_ADMIN_EMAIL=${{ secrets.CI_GOTRUE_SMTP_ADMIN_EMAIL }}|' .env
sed -i '' 's|GOTRUE_EXTERNAL_GOOGLE_ENABLED=.*|GOTRUE_EXTERNAL_GOOGLE_ENABLED=true|' .env
sed -i '' 's|GOTRUE_MAILER_AUTOCONFIRM=.*|GOTRUE_MAILER_AUTOCONFIRM=true|' .env
sed -i '' 's|GOTRUE_DATABASE_URL=.*|GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@postgres:5432/postgres|' .env
sed -i '' 's|GOTRUE_RATE_LIMIT_EMAIL_SENT=.*|GOTRUE_RATE_LIMIT_EMAIL_SENT=1000|' .env
sed -i '' 's|GOTRUE_DATABASE_URL=.*|GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@postgres:${POSTGRES_PORT}/${POSTGRES_DB}|' .env
sed -i '' 's|APPFLOWY_GOTRUE_BASE_URL=.*|APPFLOWY_GOTRUE_BASE_URL=http://localhost:9999|' .env
# s3
sed -i '' 's|APPFLOWY_S3_MINIO_URL=.*|APPFLOWY_S3_MINIO_URL=http://localhost:9000|' .env
sed -i '' 's|API_EXTERNAL_URL=.*|API_EXTERNAL_URL=http://localhost:9999|' .env
sed -i '' 's|POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=password|' .env
sed -i '' 's|APPFLOWY_MAILER_SMTP_USERNAME=.*|APPFLOWY_MAILER_SMTP_USERNAME=${{ secrets.CI_GOTRUE_SMTP_USER }}|' .env
sed -i '' 's|APPFLOWY_MAILER_SMTP_PASSWORD=.*|APPFLOWY_MAILER_SMTP_PASSWORD=${{ secrets.CI_GOTRUE_SMTP_PASS }}|' .env
cat .env
shell: bash

Expand Down
5 changes: 4 additions & 1 deletion deploy.env
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ SUPABASE_PASSWORD=root
REDIS_HOST=redis
REDIS_PORT=6379

# Minio Host
MINIO_HOST=minio

# AppFlowy Cloud
## URL that connects to the gotrue docker container
APPFLOWY_GOTRUE_BASE_URL=http://gotrue:9999
Expand Down Expand Up @@ -102,7 +105,7 @@ APPFLOWY_S3_CREATE_BUCKET=true
# By default, Minio is used as the default file storage which uses host's file system.
# Keep this as true if you are using other S3 compatible storage provider other than AWS.
APPFLOWY_S3_USE_MINIO=true
APPFLOWY_S3_MINIO_URL=http://minio:9000 # change this if you are using a different address for minio
APPFLOWY_S3_MINIO_URL=http://${MINIO_HOST}:9000 # change this if you are using a different address for minio
APPFLOWY_S3_ACCESS_KEY=minioadmin
APPFLOWY_S3_SECRET_KEY=minioadmin
APPFLOWY_S3_BUCKET=appflowy
Expand Down
8 changes: 4 additions & 4 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn main() -> Result<()> {
println!("All servers are up and running.");

// Step 3: Run stress tests if flag is set
let mut stress_test_cmd = if is_stress_test {
let stress_test_cmd = if is_stress_test {
println!("Running stress tests (tests starting with 'stress_test')...");
Some(
Command::new("cargo")
Expand Down Expand Up @@ -94,9 +94,9 @@ fn spawn_server(
let mut cmd = Command::new(command);
cmd.args(args);

if suppress_output {
cmd.stdout(Stdio::null()).stderr(Stdio::null());
}
// if suppress_output {
// cmd.stdout(Stdio::null()).stderr(Stdio::null());
// }

Ok(
cmd
Expand Down

0 comments on commit edb25f7

Please sign in to comment.