Update Dockerfile
This commit is contained in:
parent
5c2420ab1d
commit
53d1bc0ea1
|
|
@ -10,7 +10,11 @@ COPY production.js /app/production.js
|
||||||
COPY schema.sql /app/schema.sql
|
COPY schema.sql /app/schema.sql
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN npm install && service mysql start && mysql -u root < /app/schema.sql
|
RUN sed -i 's/test/root/g' /app/src/config/adapter.js \
|
||||||
|
&& sed -i 's/123456//g' /app/src/config/adapter.js \
|
||||||
|
&& npm install \
|
||||||
|
&& service mysql start \
|
||||||
|
&& mysql -u root < /app/schema.sql
|
||||||
|
|
||||||
EXPOSE 3306
|
EXPOSE 3306
|
||||||
EXPOSE 2000
|
EXPOSE 2000
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
CREATE USER 'test'@'127.0.0.1' IDENTIFIED BY '123456'; -- 创建一个以用户名为test,密码为123456的用户
|
CREATE DATABASE mybookmarks DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -- 创建mybookmarks数据库
|
||||||
GRANT ALL ON *.* TO 'test'@'%'; -- 给刚创建的test用户数据库所有的权限
|
|
||||||
|
|
||||||
CREATE DATABASE mybookmarks DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; -- 创建mybookmarks数据库
|
|
||||||
USE mybookmarks;
|
USE mybookmarks;
|
||||||
|
|
||||||
-- 用户信息表
|
-- 用户信息表
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue