質問編集履歴

2

追記

2021/12/06 08:12

投稿

mmmmeru
mmmmeru

スコア1

test CHANGED
File without changes
test CHANGED
@@ -23,10 +23,6 @@
23
23
  docker compose psで確認
24
24
 
25
25
  Mysqlのみexited (1)STATUS表示
26
-
27
- ログを確認
28
-
29
- mysql_host | Initializing database
30
26
 
31
27
 
32
28
 

1

追記

2021/12/06 08:12

投稿

mmmmeru
mmmmeru

スコア1

test CHANGED
File without changes
test CHANGED
@@ -70,6 +70,96 @@
70
70
 
71
71
 
72
72
 
73
+ Dockerfile
74
+
75
+ ```
76
+
77
+ # see https://github.com/TrafeX/docker-php-nginx/tree/1.10.0
78
+
79
+ # see https://qiita.com/mpyw/items/731e710342faf4513776
80
+
81
+
82
+
83
+ FROM php:7.4-fpm-alpine AS php-runtime
84
+
85
+
86
+
87
+ USER root
88
+
89
+
90
+
91
+ COPY --from=composer /usr/bin/composer /usr/bin/composer
92
+
93
+
94
+
95
+ ENV TZ=Asia/Tokyo
96
+
97
+
98
+
99
+ # Configure nginx
100
+
101
+ COPY docker/config/nginx.conf /etc/nginx/nginx.conf
102
+
103
+
104
+
105
+ # Expose the port nginx is reachable on
106
+
107
+ EXPOSE 80
108
+
109
+
110
+
111
+ # Make sure files/folders needed by the processes are accessable when they run under the nobody user
112
+
113
+ ```
114
+
115
+
116
+
117
+ composer.yml
118
+
119
+ ```
120
+
121
+ mysql:
122
+
123
+ container_name: mysql_host
124
+
125
+ image: mysql/mysql-server:5.7.36
126
+
127
+
128
+
129
+ environment:
130
+
131
+ MYSQL_ROOT_PASSWORD:
132
+
133
+ MYSQL_DATABASE:
134
+
135
+ MYSQL_USER:
136
+
137
+ MYSQL_PASSWORD: !
138
+
139
+ TZ: Asia/Tokyo
140
+
141
+ ports:
142
+
143
+ - 3306:3306
144
+
145
+ expose:
146
+
147
+ - "3306"
148
+
149
+ networks:
150
+
151
+ - docker-net
152
+
153
+ user: "1000:1000"
154
+
155
+ volumes:
156
+
157
+ - ./docker/data/mysql:/var/lib/mysql
158
+
159
+ - ./docker/db/sql:/docker-entrypoint-initdb.d
160
+
161
+ ```
162
+
73
163
  ### 試したこと
74
164
 
75
165