Skip to content

Commit

Permalink
db url fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AronNovak committed Feb 28, 2024
1 parent 4c4b101 commit ae5fc8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Guide/deployment.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To switch from the local PostgreSQL instance to a managed one (you can do it aft
- (Optional) Choose `Auto generate password` for having a secure master password.
- Choose `Connect to an EC2 compute resource` and select your already existing EC2 instance.
- Then you can `Create database`. This process is slow, check back in 10 minutes or so afterward. Note down the auto-generated password.
- Edit your `flake.nix`, under `flake.nixosConfigurations."ihp-app".services.ihp.additionalEnvVars`, you can specify the database URL like: `DATABASE_URL = "postgresql://postgres:[email protected]/postgres";`. You can find the proper hostname after the initialization is complete, on the RDS instance detail page.
- Edit your `flake.nix`, under `flake.nixosConfigurations."ihp-app".services.ihp`, you can specify the database URL like: `databaseUrl = lib.mkForce "postgresql://postgres:[email protected]/postgres";`. You can find the proper hostname after the initialization is complete, on the RDS instance detail page.
- `pg_dump --no-owner --no-acl` your existing local database on the EC2 instance directly, and then, you can load it to the newly created instance via `pgsql`. `deploy-to-nixos` won't populate the initial schema at an existing remote database, that's why dumping, `scp d`ing and loading it via `psql` is necessary.

#### (Optional) Creating an S3 bucket
Expand Down

0 comments on commit ae5fc8d

Please sign in to comment.