File tree Expand file tree Collapse file tree 2 files changed +0
-45
lines changed Expand file tree Collapse file tree 2 files changed +0
-45
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ Qiita の Markdown 記法については[Markdown 記法 チートシート](htt
2222
2323Qiita CLI を使うには ` Node.js 18.0.0 ` 以上が必要です。Node.js をはじめて使う場合はインストールする必要があります。
2424
25- > ` Docker ` で利用するには` Docker ` がインストールされている必要があります。
26-
2725### 2. Qiita CLI をインストールする
2826
2927Qiita のコンテンツを管理したいディレクトリで、以下のコマンドを実行します。
@@ -32,12 +30,6 @@ Qiita のコンテンツを管理したいディレクトリで、以下のコ
3230npm install @qiita/qiita-cli --save-dev
3331```
3432
35- > ` Docker ` で環境を構築する場合は次のコマンドで実行できます。
36- >
37- > ``` console
38- > docker run --rm -v $( pwd) :/opt -w /opt node:20-alpine3.17 sh -c " npm install @qiita/qiita-cli --save-dev && npx qiita init"
39- > ` ` `
40-
4133以下のコマンドでバージョンが表示されればインストール完了です。
4234
4335``` console
@@ -59,21 +51,13 @@ npm install @qiita/qiita-cli@latest
5951以下のコマンドを実行することで、
6052
6153- .gitignore
62- - Dockerfile
63- - docker-compose.yml
6454- GitHub Actions のワークフローファイル
6555 - 「GitHub で記事を管理する」の項目を参照
6656- ユーザー設定ファイル(qiita.config.json)
6757 - 「ユーザー設定ファイルについて」の項目を参照
6858
6959が生成されます。
7060
71- > ` Docker ` で環境を構築する場合はコンテナを起動してから実行してください。
72- >
73- > ``` console
74- > docker-compose up -d && docker-compose exec qiita sh
75- > ` ` `
76-
7761``` console
7862npx qiita init
7963```
Original file line number Diff line number Diff line change @@ -45,31 +45,6 @@ const gitignoreFileContent = `.remote
4545node_modules
4646` ;
4747
48- const dockerfilePath = path . join ( rootDir , "Dockerfile" ) ;
49- const dockerfileContent = `FROM node:20-alpine3.17
50-
51- WORKDIR /qiita
52-
53- EXPOSE 8888
54- ` ;
55-
56- const dockerComposeFilePath = path . join ( rootDir , "docker-compose.yml" ) ;
57- const dockerComposeFileContent = `version: "3"
58- services:
59- qiita:
60- container_name: qiita
61- build:
62- context: .
63- dockerfile: ./Dockerfile
64- ports:
65- - 8888:8888
66- tty: true
67- volumes:
68- - ./:/qiita
69- environment:
70- TZ: Asia/Tokyo
71- ` ;
72-
7348export const init = async ( ) => {
7449 console . log ( "設定ファイルを生成します。\n" ) ;
7550
@@ -79,10 +54,6 @@ export const init = async () => {
7954 writeFile ( publishWorkflowFilePath , publishWorkflowFileContent ) ;
8055 writeFile ( gitignoreFilePath , gitignoreFileContent ) ;
8156
82- //docker
83- writeFile ( dockerfilePath , dockerfileContent ) ;
84- writeFile ( dockerComposeFilePath , dockerComposeFileContent ) ;
85-
8657 const userConfigFilePath = config . getUserConfigFilePath ( ) ;
8758 const userConfigDir = config . getUserConfigDir ( ) ;
8859 if ( ! fs . existsSync ( userConfigFilePath ) ) {
You can’t perform that action at this time.
0 commit comments