Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed May 11, 2024
1 parent 81296af commit 3a723ee
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ S3 Media Player uses the following technologies:
* Authentication and Authorization: Cognito
* Static web content: Cloudfront and S3
* Frontend: React and AWS Amplify
* Storage: S3
* Deployment: Cloudformation / CDK
* Media Storage: S3
* Deployment: CloudFormation / CDK

## Deployment to AWS

Expand All @@ -27,7 +27,7 @@ To deploy this in your AWS account you will need the following:

On your local machine you will need the following:

* [Node.js](https://nodejs.org/en/) 12.x
* [Node.js](https://nodejs.org/en/) 22.x
* [AWS Command line interface](https://aws.amazon.com/cli/)
* Configure AWS credentials for the AWS CLI by calling `aws configure`

Expand Down Expand Up @@ -67,7 +67,7 @@ Add the following CORS configuration to `my-media-bucket`:

You can do this by executing the following command:

```bash
```sh
aws s3api put-bucket-cors --bucket my-media-bucket --cors-configuration '{
"CORSRules": [
{
Expand All @@ -82,7 +82,7 @@ aws s3api put-bucket-cors --bucket my-media-bucket --cors-configuration '{

### Deploy infrastructure

```bash
```sh
cd infrastructure
npm run cdk deploy
```
Expand Down Expand Up @@ -116,7 +116,7 @@ exports.CONFIG = {

### Deploy frontend

```bash
```sh
cd frontend
npm run deploy
```
Expand All @@ -133,27 +133,27 @@ Go to the AWS Cognito console and create users for your new web app. Don't forge

Run local frontend during development:

```bash
```sh
cd frontend
npm start
```

### Upgrade dependencies in `package.json`

```bash
```sh
npx npm-check-updates -u && npm install
```

### Managing configuration in a private branch

This project requires some configuration files with deployment specific information, e.g. domain names that should not be stored in a public git repository. That's why these files are added to `.gitignore`. If you want to still keep your configuration under version control you can do so in a private branch (e.g. `private-master`) that you could push to a private repository only.
This project requires some configuration files with deployment specific information, e.g. domain names that should not be stored in a public git repository. That's why these files are added to `.gitignore`. If you want to still keep your configuration under version control you can do so in a private branch (e.g. `private-main`) that you could push to a private repository only.

When switching from `private-master` to the public `main` branch, git will delete the configuration files. To restore them you can use the following command:
When switching from `private-main` to the public `main` branch, git will delete the configuration files. To restore them you can use the following command:

```bash
git show private-master:frontend/deploy/deploy-config.js > frontend/deploy/deploy-config.js \
&& git show private-master:frontend/src/frontend-config.ts > frontend/src/frontend-config.ts \
&& git show private-master:infrastructure/infrastructure-config.ts > infrastructure/infrastructure-config.ts
```sh
git show private-main:frontend/deploy/deploy-config.js > frontend/deploy/deploy-config.js \
&& git show private-main:frontend/src/frontend-config.ts > frontend/src/frontend-config.ts \
&& git show private-main:infrastructure/infrastructure-config.ts > infrastructure/infrastructure-config.ts
```

### Troubleshooting
Expand Down

0 comments on commit 3a723ee

Please sign in to comment.