Skip to content

Commit 240c9b9

Browse files
committed
🔧 初期設定スクリプト調整とvscodeのunwantedRecommendations設定
1 parent 505b629 commit 240c9b9

5 files changed

Lines changed: 14 additions & 12 deletions

File tree

.vscode/extensions.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
],
1616
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
1717
"unwantedRecommendations": [
18-
18+
"GitHub.codespaces",
19+
"GitHub.copilot",
20+
"GitHub.copilot-chat",
21+
"foxundermoon.shell-format"
1922
]
2023
}

docker/prod/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ services:
1111
environment:
1212
- DEBUG_MODE=false
1313
volumes:
14-
- <TODO:pass>/logs/<TODO:application_code>:/<TODO:application_code>/data/log
14+
- <TODO:log_dir>/<TODO:application_code>:/<TODO:application_code>/data/log
1515

docs/README_INIT_REPO.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
- [ ] 開発環境を初期整備する
1010

1111
1. Codespaceに接続する
12-
2. init_repo.shを編集する
12+
2. init_repo.shを編集し、シェルスクリプトを実行する
1313
```
1414
replacement_map["<TODO:application_name>"]="sample-downloader"
1515
replacement_map["<TODO:project_path>"]="d"
16-
replacement_map["<TODO:container_pass>"]="xxx"
17-
replacement_map["<TODO:application_code>"]="/xxx"
18-
replacement_map["<TODO:pass>"]="/d/Dropbox/"
16+
replacement_map["<TODO:application_code>"]="xxx"
17+
replacement_map["<TODO:log_dir>"]="/d/Dropbox/logs"
1918
```
2019
3. dockerコンテナを一通り動かしてみる
2120
4. 動かして問題が無かったら、init_repo.shを手動削除する

init_repo.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ current_directory=$(pwd)
1212
declare -A replacement_map
1313
replacement_map["<TODO:application_name>"]="sample-downloader"
1414
replacement_map["<TODO:project_path>"]="d"
15-
replacement_map["<TODO:container_pass>"]="xxx"
16-
replacement_map["<TODO:application_code>"]="/xxx"
17-
replacement_map["<TODO:pass>"]="/d/Dropbox/"
15+
replacement_map["<TODO:application_code>"]="xxx"
16+
replacement_map["<TODO:log_dir>"]="/d/Dropbox/logs"
1817

1918
# カレントディレクトリ内の .ipynb および .md 以外のファイルを取得し、置換を行う
20-
find "$current_directory" -type f ! \( -name "*.ipynb" -o -name "*.md" \) | while read -r filepath; do
19+
find "$current_directory" -type f ! \( -name "*.ipynb" -o -name "*.md" -o -name "init_repo.sh" \) | while read -r filepath; do
2120

2221
for target in "${!replacement_map[@]}"; do
2322
replacement="${replacement_map[$target]}"
2423

2524
# grepでtargetを含むファイルだけにsed操作を適用
2625
if grep -q "$target" "$filepath"; then
27-
sed -i "s/$target/$replacement/g" "$filepath"
26+
# sed の区切り文字を | に変更
27+
sed -i "s|$target|$replacement|g" "$filepath"
2828
fi
2929
done
3030

run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
python <TODO:container_pass>app/main.py
3+
python /<TODO:application_code>/app/main.py

0 commit comments

Comments
 (0)