feat:: add configs && stack 💯

This commit is contained in:
2020-09-29 18:37:27 +08:00
commit c8d083686d
11 changed files with 235 additions and 0 deletions

8
.idea/deploy.iml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/deploy.iml" filepath="$PROJECT_DIR$/.idea/deploy.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

66
.idea/workspace.xml generated Normal file
View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BranchesTreeState">
<expand>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
</expand>
<select />
</component>
<component name="ChangeListManager">
<list default="true" id="7bf2ac79-ff38-4256-a9a9-058b7de02f4e" name="默认的" comment="">
<change afterPath="$PROJECT_DIR$/configs/caddy/sealms-ui.conf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/configs/mysql8/my.cnf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/readme.md" afterDir="false" />
<change afterPath="$PROJECT_DIR$/stack/readme.md" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="GOROOT" path="$USER_HOME$/sdk/go_v1.15.2" />
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1iBDJXkbNH4d6ad87rPiVvjuaGx" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="go.import.settings.migrated" value="true" />
<property name="go.sdk.automatically.set" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
</key>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="WindowStateProjectService">
<state x="2134" y="791" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1601374943720">
<screen x="42" y="23" width="3318" height="1867" />
</state>
<state x="2134" y="791" key="#com.intellij.fileTypes.FileTypeChooser/42.23.3318.1867@42.23.3318.1867" timestamp="1601374943720" />
</component>
</project>

View File

@@ -0,0 +1,3 @@
http://dev.tp229.com:8008 {
root * /app
}

35
configs/mysql8/my.cnf Normal file
View File

@@ -0,0 +1,35 @@
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
character-set-server=utf8
max_connections=800
default_authentication_plugin = mysql_native_password
thread_handling=pool-of-threads
#gtid repl
gtid_mode=on
enforce_gtid_consistency=on
innodb_buffer_pool_size=512M
innodb_file_per_table=1
innodb_read_io_threads = 16
innodb_write_io_threads = 16
transaction_isolation = READ-COMMITTED
innodb_flush_method = O_DIRECT
innodb_log_file_size = 128M
innodb_log_files_in_group = 2
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
#log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
!includedir /etc/my.cnf.d

4
readme.md Normal file
View File

@@ -0,0 +1,4 @@
## 项目部署文档
docker-compose -f ./deploy/stack/build.yaml up -d

20
stack/build.yaml Normal file
View File

@@ -0,0 +1,20 @@
version: "3.8"
services:
node:
image: hub.local:3500/cnphpbb/node:14-alpine
restart: always
tty: true
command: sh
volumes:
- "/data/databanks/build-sync:/data"
working_dir: /data
golang:
image: hub.local:3500/golang:1.15-alpine
restart: always
tty: true
command: sh
volumes:
- "/data/databanks/build-sync:/data"
working_dir: /data

46
stack/dbs.yaml Normal file
View File

@@ -0,0 +1,46 @@
version: "3.8"
services:
# 生产环境可不在docker环境搭建mysql
mysql8:
image: hub.local:3500/percona:8.0
container_name: "Dev-percona8"
restart: always
environment:
- MYSQL_ROOT_PASSWORD=dev#Kevin@0412
volumes:
- mysql8_data:/var/lib/mysql
- mysql8_logs:/var/log/mysql
- /data/deploy/configs/mysql8/my.cnf:/etc/my.cnf
networks:
DevNet:
ipv4_address: 172.23.23.251
ports:
- "3306:3306"
redis5:
image: hub.local:3500/cnphpbb/redis:6-alpine
container_name: "Dev-redis6"
restart: always
command: "--requirepass Dev#gy&0412"
volumes:
- redis_data:/data
networks:
DevNet:
ipv4_address: 172.23.23.209
ports:
- "6379:6379"
volumes:
mysql8_data:
mysql8_logs:
redis_data:
networks:
ProNet:
name: DevNet
driver: bridge
ipam:
driver: default
config:
- subnet: 172.23.23.0/24

2
stack/readme.md Normal file
View File

@@ -0,0 +1,2 @@
## 项目部署文档

37
stack/sealms.yaml Normal file
View File

@@ -0,0 +1,37 @@
version: "3.8"
services:
sealms:
image: hub.local:3500/cnphpbb/alpine-cn:3.12
restart: always
volumes:
- /data/www-root/seal-ms/sealme/release:/app
command: "/app/start.sh -d"
networks:
DevNet:
ipv4_address: 172.23.23.21
ports:
- "2975:2975"
sealms-ui:
image: hub.local:3500/cnphpbb/caddy:2-alpine
restart: always
volumes:
- /data/www-root/seal-ms/sealme-ui/dist:/app
- /data/deploy/configs/caddy/sealms-ui.conf:/etc/caddy/Caddyfile
networks:
DevNet:
ipv4_address: 172.23.23.11
ports:
- "8080:80"
networks:
ProNet:
name: DevNet
driver: bridge
ipam:
driver: default
config:
- subnet: 172.23.23.0/24