AWS
Tag: Ruby
Tag: Rails
Category: jekyll
Category: update
Category: git
Category: database
Category: PostgreSQL
Category: websocket
Category: ruby
Category: projects
Category: Redis
Category: mysql
Category: Mac
Category: Node
Category: NPM
Category: PM2
Category: nodejs
Category: Meteor
Category: Nginx
Category: gitLab
Category: Rails
- Why Ruby on Rails is better than Python Django?
- How to use Hotwire turbo in Rails 6 with Webpacker?
- Rails 6 Credentials (master.key and credentials.yml.enc)
- Rails Console
- JIRA-Atlassian-Connect-App-Django
- Rails 4 5.0 Session Cookie AuthenticityToken
- Rails Active Storage
- Rails 5 Source code Research
- 微信支付
- Rails零星笔记
Category: Homebrew
Category: CentOS
Category: FreeSwitch
Category: Ruby
- Ruby on Rails 8
- RESTful API
- Ruby on Rails 7
- Study from Ruby official website
- Ruby-Metaprogramming
- Ruby连数据库的问题
- rbenv使用
Category: Vim
Category: javascript
Category: React-Native
Category: Wechat
Category: homeland
Category: JavaScript
Category: Docker
Category: RubyMine
Category: Authorization
Category: RESTful-API
Category: Proxy
Category: Deploy
Category: Devise
Category: Bootstrap
Category: Active_Storage
Category: github
Category: Android
Category: cloud
Category: ssh
Category: python
Category: reactjs
Category: markdown
Category: ShadowSocks
Category: Code
Category: rails
Category: code
Category: Django
Category: Python
Category: DRF
Category: Fish
Category: Yarn
Category: Material-UI
Category: CSS
Category: aws
Category: uwsgi
Category: nginx
Category: docker
Category: React
Category: Enzyme
Category: Jira
Category: Interview
Category: JetBrain
Category: PyCharm
Category: ESLint
Category: Rails6
Category: NVM
Category: ssl
Category: tencent
Category: CI
Category: jenkins
Category: GitHub
Category: Credentials
Category: master.key
Category: Webpacker
Category: Turbo
Category: Hotwire
Category: Bootstrap5
Category: Flutter
Category: Clash
Category: Tor
Category: proxy
Category: Build
Category: SwitchyOmega
Category: Chrome-extension
Category: SQLAlchemy
Category: Algorithm
Category: Rails7
Category: Data
Category: Structure
Category: CPP
Category: Languages
Category: Golang
Category: Typescript
Category: Rails 8
AWS CLI
Mac Installation
https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html
S3
https://stackoverflow.com/questions/41032069/use-current-working-directory-as-path-with-aws-cli
-
Sync current folder to a bucket:
aws s3 sync . s3://[bucket-name]
-
You can also sync current folder to a bucket’s sub-folder. Please refer to the link.
Route 53 and CloudFront
Today I found my CloudFront respond 403 error.
This is the steps I debug the issue: Step 1: ```shell script dig something.example.com # This is helpful for debug network. Better than ping or netstat. something.example.com. 299 IN CNAME ja726pnjlery77.cloudfront.net. ja726pnjlery77.cloudfront.net. 59 IN A 13.224.164.14 ja726pnjlery77.cloudfront.net. 59 IN A 13.224.164.115 ja726pnjlery77.cloudfront.net. 59 IN A 13.224.164.34 ja726pnjlery77.cloudfront.net. 59 IN A 13.224.164.5
Step 2:
Open http://ondemand.simplyhired-qa.com/ in Chrome.
Then right click and click `Inspect -> Network`.
Then refresh page and click the `something.example.com` in Name.
Pay attention to the `Remote Address: 127.0.0.1:1087` in `Headers`.
Here `127.0.0.1:1087` is my browser's proxy. So I need to close the Proxy.
Then refresh again. I found `99.84.199.33` which is not in the list I got in step 1.
So I switch to another Wifi and refresh again. I got the IP which is listed in the step 1.
# RDS
## How to do SQL performance analyzing?
* AWS has a feature called [performance-insights](https://aws.amazon.com/rds/performance-insights/).
## Others
* [How to dump database to local from RDS](https://gist.github.com/syafiqfaiz/5273cd41df6f08fdedeb96e12af70e3b).
You need to [create database](https://www.postgresql.org/docs/9.0/sql-createdatabase.html) before importing.
```shell
psql -d overwatch_qa -f overwatch_qa_20201218.sql
If you have created the overwatch_qa
locally before, you can rename it by:
psql -h localhost -p 5432 --username postgres
ALTER DATABASE example_db RENAME TO example_db_new_name;
ElasticBeanstalk
Deploy Rails 6 project
- The App folder is under
/var/app/current
or/var/app/staging
. - There is a AWS S3 bucket for your account’s ElasticBeanstalk. If you don’t like EB automatically rollback to a previous version, simply remove the related app_timestamp.zip would be good.
- I got a error:
Missing rackup file 'config.ru' /opt/rubies/ruby-3.0.6/lib/ruby/gems/3.0.0/gems/puma-6.4.2/lib/puma/configuration.rb:366:in `load_rackup'
To solve it, you should read https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby.container.html
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ruby-platform-procfile.html