質問編集履歴

1

docker-compose.ym

2019/06/16 04:30

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -17,3 +17,59 @@
17
17
  database: myapp_test
18
18
 
19
19
  ```
20
+
21
+
22
+
23
+
24
+
25
+ ```docker-compose.ym
26
+
27
+
28
+
29
+ version: "3"
30
+
31
+
32
+
33
+ services:
34
+
35
+ web:
36
+
37
+ build: web
38
+
39
+ ports:
40
+
41
+ - "3000:3000"
42
+
43
+ environment:
44
+
45
+ - "DATABASE_HOST=db"
46
+
47
+ - "DATABASE_PORT=5432"
48
+
49
+ - "DATABASE_USER=postgres"
50
+
51
+ - "DATABASE_PASSWORD=mysecretpassword1234"
52
+
53
+ volumes:
54
+
55
+ - "./app:/app"
56
+
57
+ stdin_open: true
58
+
59
+
60
+
61
+ db:
62
+
63
+ image: postgres:10.1
64
+
65
+ ports:
66
+
67
+ - "5432:5432"
68
+
69
+ environment:
70
+
71
+ - "POSTGRES_USER=postgres"
72
+
73
+ - "POSTGRES_PASSWORD="
74
+
75
+ ```