Skip to content

Commit

Permalink
RDS Databases
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsoderlund committed Sep 18, 2024
1 parent 2f719cc commit 02ab77a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
31 changes: 31 additions & 0 deletions Development/Hosting/Amazon AWS - S3 etc.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,34 @@ Only set in S3, not CloudFront
- Needs a Custom SSL Certificate
- Request or Import a Certificate with ACM
- Route 53: "A" to Alias "d3htstcz5zldi1.cloudfront.net."


## RDS Databases

- Mindful of **region**, e.g. Sweden https://eu-north-1.console.aws.amazon.com/rds/home?region=eu-north-1
- Create new database:
- Aurora (PostgreSQL Compatible)
- Production not Test
- DB cluster identifier = project-slug
- Credentials: Managed in AWS Secrets Manager
- Serverless v2: low capacity'
- Don't create an Aurora Replica
- Don’t connect to an EC2 compute resource
- Public access: Yes
- After, set inbound rules (firewall): https://eu-north-1.console.aws.amazon.com/ec2/home?region=eu-north-1#SecurityGroups:
- Get password from

Example:

- Host: [project-slug].cluster-cd6ogouy0vxz.eu-north-1.rds.amazonaws.com
- Username: postgres
- Password: (from AWS Secrets Manager)
- Database: postgres

### Migrate from ElephantSQL to AWS RDS

# Export from old database
pg_dump -h balarama.db.elephantsql.com -U [USERNAME] -W [USERNAME] > backup.sql

# Import to new database
psql -h [PROJECTNAME].cluster-cd6ogouy0vxz.eu-north-1.rds.amazonaws.com -U postgres -W postgres < backup.sql
6 changes: 3 additions & 3 deletions Development/JavaScript/Remix.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ https://remix.run/

### Create Remix folder structure

# Client/shared
# Shared server + client
mkdir -p app/components/scenes
mkdir -p app/components/page
mkdir -p app/components/navigation
Expand All @@ -16,13 +16,13 @@ https://remix.run/
mkdir -p app/hooks
mkdir -p app/utils
mkdir -p app/theme
# Server-only
# Server only
mkdir -p app/.server/loaders
mkdir -p app/.server/actions
mkdir -p app/.server/services
mkdir -p app/.server/utils
mkdir -p app/.server/config
# Client-only
# Client only
#mkdir -p app/.client
# Public
mkdir -p public
Expand Down

0 comments on commit 02ab77a

Please sign in to comment.