This repository has been archived by the owner on Apr 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d6b58b
commit dd2e422
Showing
17 changed files
with
192 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.DS_Store | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
# 版本号可以自己根据项目的版本修改 | ||
Version=1.5.6 | ||
|
||
# MYSQL_ROOT_PASSWORD 不支持纯数字, 字符串位数推荐大于等于 8 | ||
MYSQL_ROOT_PASSWORD=oM0aevSQaH8Bd2Bgg5cX8lOd | ||
# MySQL | ||
DB_HOST=mysql | ||
DB_PORT=3306 | ||
DB_USER=jumpserver | ||
DB_PASSWORD=nu4x599Wq7u0Bn8EABh3J91G | ||
DB_NAME=jumpserver | ||
|
||
# SECRET_KEY 不支持纯数字, 推荐字符串位数大于等于 50, 仅首次安装定义, 升级或者迁移请勿修改此项 | ||
SECRET_KEY=B3f2w8P2PfxIAS7s4URrD9YmSbtqX4vXdPUL217kL9XPUOWrmy | ||
# Redis | ||
REDIS_HOST=redis | ||
REDIS_PORT=6379 | ||
REDIS_PASSWORD=8URXPL2x3HZMi7xoGTdk3Upj | ||
|
||
# BOOTSTRAP_TOKEN 不支持纯数字, 推荐字符串位数大于等于 16, 仅首次安装定义, 升级或者迁移请勿修改 | ||
# Core | ||
SECRET_KEY=B3f2w8P2PfxIAS7s4URrD9YmSbtqX4vXdPUL217kL9XPUOWrmy | ||
BOOTSTRAP_TOKEN=7Q11Vz6R2J6BLAdO | ||
|
||
## | ||
# SECRET_KEY 保护签名数据的密匙, 首次安装请一定要修改并牢记, 后续升级和迁移不可更改, 否则将导致加密的数据不可解密。 | ||
# BOOTSTRAP_TOKEN 为组件认证使用的密钥, 仅组件注册时使用。组件指 koko、guacamole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.DS_Store | ||
.git/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
# | ||
|
||
sleep 5s | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM centos:7 | ||
WORKDIR /opt | ||
ARG Version=1.5.6 | ||
ENV Version=${Version} \ | ||
LC_ALL=en_US.UTF-8 | ||
|
||
RUN set -ex \ | ||
&& yum install -y epel-release wget \ | ||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | ||
&& yum -y install mariadb-server \ | ||
&& yum remove -y wget \ | ||
&& yum clean all \ | ||
&& rm -rf /var/cache/yum/* | ||
|
||
COPY mysql/entrypoint.sh . | ||
RUN chmod 755 ./entrypoint.sh | ||
|
||
CMD ["./entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# | ||
|
||
function config_mysql { | ||
if [ $DB_PORT != 3306 ]; then | ||
if [ ! "$(cat /etc/my.cnf | grep port=)" ]; then | ||
sed -i "10i port=$DB_PORT" /etc/my.cnf | ||
else | ||
sed -i "s/port=.*/port=$DB_PORT/g" /etc/my.cnf | ||
fi | ||
fi | ||
} | ||
|
||
if [ ! -d "/var/lib/mysql/$DB_NAME" ]; then | ||
config_mysql | ||
mysql_install_db --user=mysql --datadir=/var/lib/mysql --force | ||
mysqld_safe & | ||
sleep 5s | ||
mysql -uroot -e "create database $DB_NAME default charset 'utf8';grant all on $DB_NAME.* to '$DB_USER'@'%' identified by '$DB_PASSWORD';flush privileges;"; | ||
mysql --version | ||
tail -f /var/log/mariadb/mariadb.log | ||
else | ||
config_mysql | ||
mysql --version | ||
mysqld_safe | ||
fi |
Oops, something went wrong.