質問編集履歴

5

擬似

2022/04/04 19:53

投稿

saito5940
saito5940

スコア63

test CHANGED
File without changes
test CHANGED
@@ -11,11 +11,11 @@
11
11
  image,postgres:12.1
12
12
  expose,"- ""5432"""
13
13
  web-backend:,
14
- container_name:,atcoder-stream-backend
14
+ container_name:,atcoder-stream
15
15
  build,
16
- context:,./atcoder-stream-backend
16
+ context:,./atcoder-stream
17
17
  dockerfile:,Dockerfile
18
- volumes:, - ./atcoder-stream-backend・・・・
18
+ volumes:, - ./atcoder-stream・・・・
19
19
  ,- ./atcoder-stream-backend/・・・
20
20
  ,- ./atcoder-stream-backend/・・
21
21
  ports:,
@@ -39,39 +39,40 @@
39
39
  ```
40
40
 
41
41
  こんな感じのファイルです。これを変換すると、
42
- 想定しているのが
42
+ 想定しているのが(サンプルです)
43
43
  ```ここに言語を入力
44
- ersion: "3"
44
+ version: "3"
45
45
 
46
46
  services:
47
47
  db:
48
- container_name:
48
+ container_name: atcoder-stream-db
49
- image:
49
+ image: postgres:12.1
50
50
  expose:
51
51
  - "5432"
52
52
 
53
53
  web-backend:
54
- container_name:
54
+ container_name: atcoder
55
55
  build:
56
- context:
56
+ context: ./atcoder
57
- dockerfile:
57
+ dockerfile: Dockerfile
58
58
  volumes:
59
- -
59
+ - ./atcoder-stream-backend
60
- -
60
+ - ./atcoder-stream-backend
61
- -
61
+ - ./atcoder-stream-backend/
62
62
  ports:
63
63
  # host:container
64
64
  - "8000:8000"
65
65
  depends_on:
66
66
  - db
67
- command:
67
+ command: sh -c "python /app/src/atcoder-stream-api/manage.py migrate && python /app/src/atcoder-stream-api/manage.py runserver 0.0.0.0:8000"
68
+
68
69
  web-frontend:
69
- container_name:
70
+ container_name: atcoder-stream
70
71
  build:
71
- context:
72
+ context: ./atcoder-stream
72
73
  dockerfile: Dockerfile
73
74
  volumes:
74
- - .
75
+ - ./atcoder-stream-frontend:/app
75
76
  ports:
76
77
  # host:container
77
78
  - "3000:3000"

4

誤字

2022/04/04 19:47

投稿

saito5940
saito5940

スコア63

test CHANGED
File without changes
test CHANGED
@@ -41,26 +41,41 @@
41
41
  こんな感じのファイルです。これを変換すると、
42
42
  想定しているのが
43
43
  ```ここに言語を入力
44
+ ersion: "3"
45
+
44
- version: 3
46
+ services:
45
- 'services:': .nan
47
+ db:
46
- 'db:':
48
+ container_name:
47
- 'container_name:': atcoder-stream-frontend
49
+ image:
48
- image: postgres:12.1
50
+ expose:
49
- expose: '- "5432"'
51
+ - "5432"
52
+
50
- 'web-backend:':
53
+ web-backend:
54
+ container_name:
55
+ build:
56
+ context:
57
+ dockerfile:
58
+ volumes:
59
+ -
60
+ -
61
+ -
62
+ ports:
63
+ # host:container
51
- ' build': .nan
64
+ - "8000:8000"
65
+ depends_on:
66
+ - db
67
+ command:
68
+ web-frontend:
52
- 'context:': ./atcoder-stream-frontend
69
+ container_name:
70
+ build:
71
+ context:
53
- 'dockerfile:': Dockerfile
72
+ dockerfile: Dockerfile
54
- 'volumes:':
73
+ volumes:
74
+ - .
75
+ ports:
76
+ # host:container
55
- .nan: ' - "3000:3000"'
77
+ - "3000:3000"
56
- 'ports:':
57
- 'depends_on:':
58
- 'command:': sh -c "python /app/src/atcoder-stream-api/manage.py migrate && python
59
- 'web-frontend:':
60
- 'build:':
61
- 'dockerfil:': Dockerfile
62
- 'port:':
63
- ' command:': ' sh -c "cd /app && yarn start"'
78
+ command: sh -c "cd /app && yarn start"
64
79
  ```
65
80
 
66
81
  こんなdocker-compose.ymlのような形式で出力させたいのですが、

3

追加

2022/04/03 22:22

投稿

saito5940
saito5940

スコア63

test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,5 @@
1
+ python初学者です。
2
+
1
3
  csvファイルを読み込み、Yamlファイルに変換したいとコードを書いています。
2
4
 
3
5
  csvファイルはこんな形式です。

2

誤字 脱字

2022/04/03 22:21

投稿

saito5940
saito5940

スコア63

test CHANGED
File without changes
test CHANGED
@@ -108,9 +108,9 @@
108
108
  ```
109
109
 
110
110
  versionが表示されなくて3だけが出力されます。
111
- nanが表示されます。
111
+ nanが表示されています。
112
112
 
113
- vscodeよく見ると、cofig.yamlversionモジュールになっています。
113
+ vscodeよく見ると、cofig.yaml→{versionになっています。
114
114
  何故文字列と認識されないのか分かりません。
115
115
  keyに対してvalueが空だからnanと出力されたのだと思いますが、これを削除したいです。
116
116
  ただのエクセルならnamをpandasで削除と考えたのですが、

1

脱字

2022/04/03 22:19

投稿

saito5940
saito5940

スコア63

test CHANGED
File without changes
test CHANGED
@@ -64,7 +64,7 @@
64
64
  こんなdocker-compose.ymlのような形式で出力させたいのですが、
65
65
  テストで以下のようにpythonで記述しました。
66
66
  ```ここに言語を入力
67
- mport pandas as pd
67
+ import pandas as pd
68
68
  from pathlib import Path
69
69
  import yaml
70
70