Skip to content

Commit

Permalink
Merge pull request #101 from mercari-build/revert-100-feat/update-doc…
Browse files Browse the repository at this point in the history
…s-and-add-cloud-run-deploy

Revert "Update docs. mainly replace 2022->2023"
  • Loading branch information
wakanapo authored Mar 31, 2023
2 parents 939507a + 6ac8c9e commit 78cf69c
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build@Mercari Training Program 2023
# Build@Mercari Training Program 2022

This is @<your github id>'s build training repository.

Expand Down
16 changes: 8 additions & 8 deletions document/step1.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ In this step, we will learn how to use Git and Github.
* [GitHub Ultimate: Master Git and GitHub - Beginner to Expert](https://www.udemy.com/course/github-ultimate/)


## Fork this **mercari-build-training-2023** repository
## Fork this **mercari-build-training-2022** repository

* Fork [mercari-build-training-2023](https://github.com/mercari-build/mercari-build-training-2023)
* You will see be able to see `https://github.com/<your github id>/mercari-build-training-2023` if successful.
* Fork [mercari-build-training-2022](https://github.com/mercari-build/mercari-build-training-2022)
* You will see be able to see `https://github.com/<your github id>/mercari-build-training-2022` if successful.


## Install Git
Expand All @@ -30,24 +30,24 @@ In this step, we will learn how to use Git and Github.

## Use basic commands in Git

1. **Clone** `https://github.com/<your github id>/mercari-build-training-2023` onto your local using the following command.
1. **Clone** `https://github.com/<your github id>/mercari-build-training-2022` onto your local using the following command.
```shell
$ cd <your working space>
$ git clone https://github.com/<your github id>/mercari-build-training-2023
$ git clone https://github.com/<your github id>/mercari-build-training-2022
```

**:bangbang: Caution**

Please definitely run the following command after cloning repository.
```
cd mercari-build-training-2023
cd mercari-build-training-2022
git config --local core.hooksPath .githooks/
```
This is required to use githooks in mercari-build-training-2023 repository.
This is required to use githooks in mercari-build-training-2022 repository.

2. Make a new branch named `first-pull-request` and **checkout** into this branch
```shell
$ cd <your working space>/mercari-build-training-2023
$ cd <your working space>/mercari-build-training-2022
$ git branch first-pull-request
$ git checkout first-pull-request
```
Expand Down
14 changes: 7 additions & 7 deletions document/step1.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* [Gitを使ったバージョン管理](https://backlog.com/ja/git-tutorial/intro/01/)
* [Udemy - Git & Github基礎講座](https://www.udemy.com/course/git-github-a/)

## **mercari-build-training-2023** リポジトリをフォークする
## **mercari-build-training-2022** リポジトリをフォークする

* [mercari-build-training-2023](https://github.com/mercari-build/mercari-build-training-2023)
* [mercari-build-training-2022](https://github.com/mercari-build/mercari-build-training-2022)
をあなたのGithubにForkします。
* Forkに成功すると `https://github.com/<your github id>/mercari-build-training-2023`
* Forkに成功すると `https://github.com/<your github id>/mercari-build-training-2022`
というようなリポジトリができます。

## Gitをインストールする
Expand All @@ -30,25 +30,25 @@

## Gitの基本コマンドを使う

1. `https://github.com/<your github id>/mercari-build-training-2023`**clone**
1. `https://github.com/<your github id>/mercari-build-training-2022`**clone**
します。 cloneすると、github上のリポジトリを自分のローカルにDownloadできます。
```shell
$ cd <your working space>
$ git clone https://github.com/<your github id>/mercari-build-training-2023
$ git clone https://github.com/<your github id>/mercari-build-training-2022
```

**:bangbang: 注意**

cloneができたら必ず以下のコマンドを実行してください。
```shell
$ cd mercari-build-training-2023
$ cd mercari-build-training-2022
$ git config --local core.hooksPath .githooks/
```
これは mercari-build-training-2022 が githooks という機能を使うために必要なものです。

2. `first-pull-request`というブランチを作り、そのブランチに**checkout**します
```shell
$ cd <your working space>/mercari-build-training-2023
$ cd <your working space>/mercari-build-training-2022
$ git branch first-pull-request
$ git checkout first-pull-request
```
Expand Down
2 changes: 1 addition & 1 deletion document/step2.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ If the version does not correspond to the Python version you installed, double c

### 3. Install dependencies

In Go, dependent libraries are managed in a file called `go.mod`.
In Go, dependent libraries are managed in a file called `go.mod`.
You can install the dependencies by running the following command.

```shell
Expand Down
2 changes: 1 addition & 1 deletion document/step3.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ $ curl -X GET 'http://127.0.0.1:9000/items'

## 4. Databaseに保存する

ここまで`items.json`に情報を保存してきましたが、このデータをデータベースに移し替えます。
ここまで`items.json`に情報を保存してきましたが、このデータをデータベースに移し替えます。
今回は **SQLite**というデータベースを使います。

**:book: Reference**
Expand Down
2 changes: 1 addition & 1 deletion document/step4.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In this step, we will learn how to use Docker.


## 2. Run Docker commands
**Make sure that you're in `mercari-build-training-2023/` directory, and run the following command.**
**Make sure that you're in `mercari-build-training-2022/` directory, and run the following command.**

```shell
$ docker run -v $(pwd)/data/text_en.png:/tmp/img.png wakanapo/tesseract-ocr tesseract /tmp/img.png stdout -l eng
Expand Down
8 changes: 4 additions & 4 deletions document/step4.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ docker はホスト上に存在しないイメージを使う際には、自動
## 4. Docker Image を Build する
**pythonで開発をしている人は`python/`, Goの人は`go/`以下にある`dockerfile`をbuildしてみましょう。**

* 名前(リポジトリ名)は `build2023/app`, タグは`latest` とします。
* 名前(リポジトリ名)は `build2022/app`, タグは`latest` とします。

イメージ一覧の中に `build2023/app` という image があれば成功です。
イメージ一覧の中に `build2022/app` という image があれば成功です。


**:book: Reference**
Expand All @@ -91,7 +91,7 @@ docker はホスト上に存在しないイメージを使う際には、自動
```
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "python": executable file not found in $PATH: unknown.
ERRO[0000] error waiting for container: context canceled
```
```
Goの場合は、上のエラーメッセージの`"python"`の部分が`"go"`になります。


Expand All @@ -110,7 +110,7 @@ STEP4-5 までで docker image の中は STEP2-2 と同じ状態になってい

**`dockerfile`を変更し、必要なファイルをコピーしたり依存ライブラリをインストールしたりして, docker image 上で 出品 API が動くようにしましょう。**

`$ docker run -d -p 9000:9000 build2023/app:latest`
`$ docker run -d -p 9000:9000 build2022/app:latest`

を実行しSTEP3と同様にしてAPIを叩ければ成功です。

Expand Down
4 changes: 2 additions & 2 deletions document/step5.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Run the backend servers in Python/Go as described in Step3.
This simple web application allows you to do two things
- Add a new item (Listing)
- View the list of itemas (ItemList)

These functionalities are carved out as components called `src/components/Listing` and `src/components/ItemList`, and called from the main `App.tsx`.

:pushpin: Sample code is in React but the knowledge of React is not necessary.
Expand All @@ -37,7 +37,7 @@ Use the listing form to add a new item. In this screen, you can input name, cate
If your API from STEP3 only accepts name and category, modify `typescript/simple-mercari-web/src/components/Listing/Listing.tsx` and delete the image field.


### (Optional) Task 2. Show item images
### (Optional) Task 2. Show item images

In this screen, item images are all rendered as Build@Mercari logo. Specify the item image as `http://localhost:9000/image/<item_id>.jpg` and see if they can be displayed on the web app.

Expand Down
8 changes: 4 additions & 4 deletions document/step6.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ In this step, we will learn how to use docker-compose.

You have a sample `dockerfile` In `typescript/simple-mercari-web`. Modify this file to run frontend on Docker.

* Set the name of the repository as `build2023/web` and tag as `latest`.
* Set the name of the repository as `build2022/web` and tag as `latest`.

Run the following and check if you can successfully open [http://localhost:3000/](http://localhost:3000/) on your browser.

`$ docker run -d -p 3000:3000 build2023/web:latest`
`$ docker run -d -p 3000:3000 build2022/web:latest`


## 2. Installing Docker Compose
Expand All @@ -43,12 +43,12 @@ Let's check if you can answer the following questions.
**Referring to the tutorial material, run the frontend and API using Docker Compose**


Set up `docker-compose.yml` under `mercari-build-training-2023/`
Set up `docker-compose.yml` under `mercari-build-training-2022/`

Make a new file `docker-compose.yml` considering the following points.

* Docker image to use
* (Option 1: Difficulty ☆) Use `build2022/app:latest` and `build2023/web:latest` made in STEP4 and STEP6-1
* (Option 1: Difficulty ☆) Use `build2022/app:latest` and `build2022/web:latest` made in STEP4 and STEP6-1
* (Option 2: Difficulty ☆☆☆) Build from `{go|python}/dockerfile` and `typescript/simple-mercari-web/dockerfile`
* Port numbers
* API : 9000
Expand Down
6 changes: 3 additions & 3 deletions document/step6.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

`typescript/simple-mercari-web`以下にフロントエンド用の `dockerfile` がすでに用意されています。これを変更しフロントエンドが docker 上で立ち上がるようにしましょう。

* 名前(リポジトリ名)は `build2023/web`, タグは`latest` とします。
* 名前(リポジトリ名)は `build2022/web`, タグは`latest` とします。

`$ docker run -d -p 3000:3000 build2022/web:latest`

Expand Down Expand Up @@ -41,12 +41,12 @@
## 4. Docker ComposeでAPIとフロントエンドを動かす
**チュートリアルを参考にしながら、今回作成したサービスのフロントエンドとバックエンドのAPIをDocker Composeで動かせるようにしましょう**

`docker-compose.yml``mercari-build-training-2023/` 以下に作成することにします。
`docker-compose.yml``mercari-build-training-2022/` 以下に作成することにします。

以下の点を参考にしながら `docker-compose.yml` を作成しましょう。

* 使用する docker image
* (Option 1: 難易度 ☆) STEP4 と STEP6-1 でそれぞれ build した `build2023/app:latest``build2022/web:latest` を使う
* (Option 1: 難易度 ☆) STEP4 と STEP6-1 でそれぞれ build した `build2022/app:latest``build2022/web:latest` を使う
* (Option 2: 難易度 ☆☆☆) `{go|python}/dockerfile``typescript/simple-mercari-web/dockerfile` から build するようにする
* 使用する port
* API : 9000
Expand Down
6 changes: 3 additions & 3 deletions document/team-hackathon.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

Form a team and propose and develop a new listing feature at Mercari.

For example,
For example,

* A better and more user-friendly UI
* Allow videos for listing
* Use OCR for automatically input the item title
* Speech-to-text input

Any types of improvement on the listing feature are welcome in different aspects like UI, Backend or AI.
Any types of improvement on the listing feature are welcome in different aspects like UI, Backend or AI.


## Development Process

* Choose one person to create a repository on GitHub
* Make the repository public and add everyone in your Hackathon team as contributors
* Make the repository public and add everyone in your Hackathon team as contributors
* Each team member should contribute via Pull Requests and work from their own branch

**:beginner: Point**
Expand Down
2 changes: 1 addition & 1 deletion go/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module mercari-build-training-2023
module mercari-build-training-2022

go 1.17

Expand Down

0 comments on commit 78cf69c

Please sign in to comment.