rahhi555 / portfolio-api Goto Github PK
View Code? Open in Web Editor NEWポートフォリオ「ミニマップ」のapi
ポートフォリオ「ミニマップ」のapi
CORSを設定してfrontとの通信をできるようにする
user作成時にfirebase auth tokenを認証し、返ってきたuidを登録する。そのため、firebase-auth-railsgem及びこのgemに必要なredisサーバーを用意する必要あり。
postメソッドで/api/v1/users
を叩けば新規ユーザーが作成されるようにする。
カラム名 | データ型 | 制約 |
---|---|---|
uid | string | not null, unique |
name | string | not null |
件名の解決のため、mapsテーブルにwidthカラムとheightカラムを追加する
GithubActionsでECRにプッシュできるようにする。
200を返す/health-checkパスを作成する。
DockerfileにカレントディレクトリをWORKDIRにコピーする記述を忘れていたため、ほぼからのイメージがプッシュされている。ECSデプロイも失敗している。
config.hostsを設定して本番環境でfrontのみ通信を許可するようにする
entrypoint.shを用意しなくてもタスク定義でCMDを渡せるので、そこで["be", "rails", "s", "-b", "0.0.0.0"]のようにすれば大丈夫だと判明した。
before
Rails.application.credentials.db[:host]
after
<%= Rails.application.credentials.db[:host] %>
firebaseエミュレーターで生成されるトークンでは認証できないので、開発環境のみトークン認証を緩和する。
credentialsを設定して本番環境でrails sできるようにする
他のログのノイズになる上、ヘルスチェック失敗=コンテナ破棄なので取得できないことからヘルスチェックのログは出さないようにする
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.