Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
KinjiKawaguchi committed Apr 17, 2024
2 parents 83638eb + fad1f9d commit 48719b7
Show file tree
Hide file tree
Showing 91 changed files with 166 additions and 214 deletions.
7 changes: 7 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@

- **compose.ci.yaml** Docker イメージをビルドするためのレシピ
- **compose.yaml** デプロイ先のサーバで実際にサービスを起動するための構成を記述したファイル

手元でやるときはこのディレクトリで以下のようにすると本番サーバの様子をそこそこ再現できます。
```bash
docker compose build -f compose.ci.yaml
docker compose -f compose.yaml up -d
# docker compose -f compose.yaml logs -f # ログを tail
```
12 changes: 8 additions & 4 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ services:
image: ghcr.io/su-its/typing-app:dev
ports:
- "3000:3000"
# TODO: イメージビルド時ではなくコンテナ起動時に環境変数をセットする方が便利なのでそうしたい
# NEXT_PUBLIC_ を使わなくなればそれができる。そのときはこのコメントアウトを外す
# environment:
# API_URL: http://api:8080
# TODO: NEXT_PUBLIC_ を使わなくなればうれしい
# NEXT_PUBLIC_API_URL と API_URL が共存しているのは
# ブラウザから呼び出したい時とコンテナ内から呼び出したい時を使い分けたいから
# 本当は全部 app サーバ(コンテナ)側に寄せたい
environment:
API_URL: http://api:8080
restart: always
api:
image: ghcr.io/su-its/typing-server:dev
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
Expand Down
1 change: 1 addition & 0 deletions typing-app/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
API_URL=http://localhost:8080
NEXT_PUBLIC_API_URL=http://localhost:8080
4 changes: 3 additions & 1 deletion typing-app/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ bun.lockb
eslint.config.js
package-lock.json
yarn.lock
src/libs/api/v1.d.ts

# 自動生成のファイル
src/libs/api/*.d.ts
3 changes: 2 additions & 1 deletion typing-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typing-app",
"version": "0.1.0",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -27,6 +27,7 @@
"prettier": "^3.2.5",
"react": "^18",
"react-dom": "^18",
"server-only": "^0.0.1",
"sharp": "^0.33.3",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7"
Expand Down
4 changes: 1 addition & 3 deletions typing-app/public/texts/text1.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
It is April 2002, and I am visiting Tokuro Takei’s comfortably sunlit Japanese/Western-style home in Hamamatsu, Japan for the first time. His wife meets me at the door with a deep bow, which I return with one of my own before handing over a gift-wrapped box of rice crackers and offering a stock Japanese apology for imposing myself like this. Mrs. Takei receives my gift with another bow and, as etiquette dictates, politely refuses to acknowledge my need to apologize. I remove my shoes in the ground-level foyer and step up on to the raised floor of the house in my stocking feet. Mrs. Takei offers me the customary house slippers a visitor to a Japanese house will typically wear. I decline the offer on the valid grounds that my feet are too big for the slippers, and we share a quick if bashful laugh over this footwear conundrum while she shows me to the living room sofa.
When not in motion plying me with green tea and cookies while we wait for her husband to come to the living room, Mrs. Takei stands a few steps behind the sofa and just out of my field of vision. I can sense her nervousness, and am not sure if her taciturnity stems from fear and shyness or from her assuming that a language barrier will make any attempts at meaningful conversation a mutually embarrassing exercise in frustration. Accordingly, neither of us says anything. I sit on the Takeis’ sofa looking at naval citations on the wall and plastic models of Zero fighters lined up on the bookshelves while Mrs. Takei maintains her vigil safely out of sight.
The cultural dynamic of silence at work here – which I have encountered thousands of times during my Japanese sojourn – is not particularly uncomfortable for me (although it may be for Takei-san, uninitiated as she is to visits from international men of mystery). Over the years, I have lost my quintessentially American fear of conversational lulls longer than a few seconds, so this particular silence does not faze me. Nevertheless, I am beginning to feel a tad guilty over Takei-san’s obvious discomfort, so I decide to try to put my hostess at ease with a little demonstration of Japanese language ability. Etiquette gives me an in here – it will not be untoward for me to apologize once again for my rude intrusion (under the rules of Japanese etiquette you can never truly apologize too much for anything). The tit-for-tat torrent of stock platitudes my apology will trigger can be found virtually word for word in any basic Japanese conversation textbook, but then again, sometimes clichés can be reassuring, and I suppose this has as good a chance of breaking some ice as anything else.
It is April 2002, and I am visiting Tokuro Takei’s comfortably sunlit Japanese/Western-style home in Hamamatsu, Japan for the first time. His wife meets me at the door with a deep bow, which I return with one of my own before handing over a gift-wrapped box of rice crackers and offering a stock Japanese apology for imposing myself like this. Mrs. Takei receives my gift with another bow and, as etiquette dictates, politely refuses to acknowledge my need to apologize. I remove my shoes in the ground-level foyer and step up on to the raised floor of the house in my stocking feet. Mrs. Takei offers me the customary house slippers a visitor to a Japanese house will typically wear. I decline the offer on the valid grounds that my feet are too big for the slippers, and we share a quick if bashful laugh over this footwear conundrum while she shows me to the living room sofa. When not in motion plying me with green tea and cookies while we wait for her husband to come to the living room, Mrs. Takei stands a few steps behind the sofa and just out of my field of vision. I can sense her nervousness, and am not sure if her taciturnity stems from fear and shyness or from her assuming that a language barrier will make any attempts at meaningful conversation a mutually embarrassing exercise in frustration. Accordingly, neither of us says anything. I sit on the Takeis’ sofa looking at naval citations on the wall and plastic models of Zero fighters lined up on the bookshelves while Mrs. Takei maintains her vigil safely out of sight. The cultural dynamic of silence at work here – which I have encountered thousands of times during my Japanese sojourn – is not particularly uncomfortable for me (although it may be for Takei-san, uninitiated as she is to visits from international men of mystery). Over the years, I have lost my quintessentially American fear of conversational lulls longer than a few seconds, so this particular silence does not faze me. Nevertheless, I am beginning to feel a tad guilty over Takei-san’s obvious discomfort, so I decide to try to put my hostess at ease with a little demonstration of Japanese language ability. Etiquette gives me an in here – it will not be untoward for me to apologize once again for my rude intrusion (under the rules of Japanese etiquette you can never truly apologize too much for anything). The tit-for-tat torrent of stock platitudes my apology will trigger can be found virtually word for word in any basic Japanese conversation textbook, but then again, sometimes clichés can be reassuring, and I suppose this has as good a chance of breaking some ice as anything else.
3 changes: 1 addition & 2 deletions typing-app/public/texts/text2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
The quick brown fox jumps over the lazy dog. This sentence contains every letter of the alphabet, making it a perfect pangram for typing practice. It's a classic phrase that has been used since the late 19th century to test typewriters and computer keyboards.
Peter Piper picked a peck of pickled peppers. A peck of pickled peppers Peter Piper picked. If Peter Piper picked a peck of pickled peppers, where's the peck of pickled peppers Peter Piper picked? This tongue twister is not only great for typing practice but also helps improve pronunciation and articulation.
The quick brown fox jumps over the lazy dog. This sentence contains every letter of the alphabet, making it a perfect pangram for typing practice. It's a classic phrase that has been used since the late 19th century to test typewriters and computer keyboards. Peter Piper picked a peck of pickled peppers. A peck of pickled peppers Peter Piper picked. If Peter Piper picked a peck of pickled peppers, where's the peck of pickled peppers Peter Piper picked? This tongue twister is not only great for typing practice but also helps improve pronunciation and articulation.
4 changes: 1 addition & 3 deletions typing-app/public/texts/text3.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nulla sit amet aliquam lacinia, nisl nisl aliquam nisl, nec aliquam nisl nisl sit amet nisl. Sed euismod, nulla sit amet aliquam lacinia, nisl nisl aliquam nisl, nec aliquam nisl nisl sit amet nisl. This is a commonly used placeholder text in publishing and graphic design, and it's perfect for typing practice as it contains a variety of letters and punctuation.
It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his breast in an effort to escape the vile wind, slipped quickly through the glass doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him. This is the opening paragraph from George Orwell's dystopian novel "1984," which provides an engaging and thought-provoking typing exercise.
I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident, that all men are created equal." This is an excerpt from Martin Luther King Jr.'s famous "I Have a Dream" speech, which not only serves as an excellent typing practice but also reminds us of the importance of equality and social justice.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nulla sit amet aliquam lacinia, nisl nisl aliquam nisl, nec aliquam nisl nisl sit amet nisl. Sed euismod, nulla sit amet aliquam lacinia, nisl nisl aliquam nisl, nec aliquam nisl nisl sit amet nisl. This is a commonly used placeholder text in publishing and graphic design, and it's perfect for typing practice as it contains a variety of letters and punctuation. It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his breast in an effort to escape the vile wind, slipped quickly through the glass doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him. This is the opening paragraph from George Orwell's dystopian novel "1984," which provides an engaging and thought-provoking typing exercise. I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident, that all men are created equal." This is an excerpt from Martin Luther King Jr.'s famous "I Have a Dream" speech, which not only serves as an excellent typing practice but also reminds us of the importance of equality and social justice.
Loading

0 comments on commit 48719b7

Please sign in to comment.