Skip to content

Commit 49c8a4c

Browse files
committed
add mysql image build files & change enable.auto defaults to true in gateway
1 parent 4a6c895 commit 49c8a4c

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

mse-simple-demo/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ cd "$(dirname "$0")"
77
./B/build.sh
88
./C/build.sh
99
./gateway/build.sh
10+
./mysql/build.sh

mse-simple-demo/mysql/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM mysql:5.7
2+
WORKDIR /docker-entrypoint-initdb.d
3+
ENV LANG=C.UTF-8
4+
ADD init.sql .

mse-simple-demo/mysql/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
set -e
3+
4+
cd "$(dirname "$0")"
5+
6+
docker build --platform linux/amd64 . -t ${REGISTRY}demo-mysql:2.0.1
7+
8+
if [ -n "${REGISTRY}" ]; then
9+
docker push ${REGISTRY}demo-mysql:2.0.1
10+
fi

mse-simple-demo/mysql/init.sql

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-- 建库
2+
create database `demo`;
3+
-- 设置字符集
4+
SET character_set_client = utf8;
5+
6+
use demo;
7+
8+
DROP TABLE IF EXISTS user;
9+
10+
CREATE TABLE user
11+
(
12+
id BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
13+
name VARCHAR(30) NULL DEFAULT NULL COMMENT '姓名',
14+
age INT(11) NULL DEFAULT NULL COMMENT '年龄',
15+
email VARCHAR(50) NULL DEFAULT NULL COMMENT '邮箱',
16+
PRIMARY KEY (id)
17+
);
18+
19+
INSERT INTO user (id, name, age, email) VALUES
20+
(1, 'Jone', 18, 'test1@baomidou.com'),
21+
(2, 'Jack', 20, 'test2@baomidou.com'),
22+
(3, 'Tom', 28, 'test3@baomidou.com'),
23+
(4, 'Sandy', 21, 'test4@baomidou.com'),
24+
(5, 'Billie', 24, 'test5@baomidou.com');

0 commit comments

Comments
 (0)