mirror of
https://gitee.com/kennylee/docker.git
synced 2024-12-01 19:38:30 +08:00
1.添加registry构建镜像 2.提交symphony基础使用
This commit is contained in:
parent
6c107f2359
commit
0d18c84e40
@ -2,9 +2,7 @@
|
||||
|
||||
Jetbrains全系列的证书验证服务器,镜像大小不到10M。
|
||||
|
||||
版本为 v1.0.4,目前(2017-09-26)实测支持到Jetbrains的2017.2版本系列IDE。
|
||||
|
||||
作者官网 http://jetbrains.tencent.click/
|
||||
版本为 v1.0.5,目前(2017-12-01)实测支持到Jetbrains的2017.2.6版本系列IDE。
|
||||
|
||||
## 使用说明
|
||||
|
||||
|
@ -22,6 +22,12 @@
|
||||
</servers>
|
||||
|
||||
<mirrors>
|
||||
<mirror>
|
||||
<id>nexus</id>
|
||||
<mirrorOf>*</mirrorOf>
|
||||
<name>Timekey Nexus</name>
|
||||
<url>http://192.168.1.99:8081/nexus/content/groups/public/</url>
|
||||
</mirror>
|
||||
<mirror>
|
||||
<id>aliyun-nexus</id>
|
||||
<name>aliyun nexus</name>
|
||||
@ -30,4 +36,34 @@
|
||||
</mirror>
|
||||
</mirrors>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>nexus</id>
|
||||
<name>timekey private nexus</name>
|
||||
<url>http://192.168.1.99:8081/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>nexus</id>
|
||||
<name>timekey private nexus</name>
|
||||
<url>http://192.168.1.99:8081/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
</settings>
|
||||
|
@ -10,26 +10,22 @@ networks:
|
||||
|
||||
services:
|
||||
&master redis-master:
|
||||
build:
|
||||
context: ./conf-ha/
|
||||
dockerfile: Dockerfile-master
|
||||
image: &image registry.cn-hangzhou.aliyuncs.com/kennylee/redis:3.2
|
||||
container_name: "master"
|
||||
ports:
|
||||
- "6379:6379"
|
||||
restart: on-failure
|
||||
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
|
||||
command: [ "redis-server" ]
|
||||
networks:
|
||||
*network :
|
||||
ipv4_address: 172.16.238.10
|
||||
redis-slave-1:
|
||||
build:
|
||||
context: ./conf-ha/
|
||||
dockerfile: Dockerfile-slave
|
||||
image: *image
|
||||
container_name: "slave"
|
||||
ports:
|
||||
- "6380:6379"
|
||||
restart: on-failure
|
||||
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
|
||||
command: [ "redis-server","--slaveof","172.16.238.10", "6379","--slave-read-only","yes"]
|
||||
networks:
|
||||
*network :
|
||||
ipv4_address: 172.16.238.11
|
||||
|
16
registry/Dockerfile
Normal file
16
registry/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM registry
|
||||
|
||||
VOLUME ["/var/lib/registry"]
|
||||
EXPOSE 5000
|
||||
|
||||
# 使用阿里云镜像
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
|
||||
# Install base packages
|
||||
RUN apk --no-cache update && \
|
||||
apk --no-cache upgrade && \
|
||||
apk --no-cache add curl bash tzdata tar unzip && \
|
||||
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||
echo "Asia/Shanghai" > /etc/timezone && \
|
||||
echo -ne "Alpine Linux 3.4 image. (`uname -rsv`)\n" >> /root/.built && \
|
||||
rm -fr /tmp/* /var/cache/apk/*
|
35
symphony/Dockerfile
Normal file
35
symphony/Dockerfile
Normal file
@ -0,0 +1,35 @@
|
||||
# ------------------------- WAR builder -------------------------
|
||||
FROM registry.cn-hangzhou.aliyuncs.com/kennylee/maven:3.5-jdk-8-alpine as builder
|
||||
|
||||
# official repository https://github.com/b3log/symphony
|
||||
ARG SYMPHONY_REPOSITORY=https://gitee.com/kennylee/symphony.git
|
||||
|
||||
ENV BUILD_PATH="/tmp" \
|
||||
PROJECT_NAME="symphony" \
|
||||
DB_PASSWORD="111111"
|
||||
|
||||
ENV CONFIG_FILE=${BUILD_PATH}/${PROJECT_NAME}/src/main/resources/local.properties
|
||||
|
||||
RUN cd $BUILD_PATH && \
|
||||
git clone $SYMPHONY_REPOSITORY $PROJECT_NAME
|
||||
RUN sed -i "s/127.0.0.1\:3306/db:3306/g" $CONFIG_FILE && \
|
||||
sed -i "s/jdbc\.password=*/jdbc\.password=${DB_PASSWORD}/g" $CONFIG_FILE
|
||||
|
||||
# war mus be at ${BUILD_PATH}/${PROJECT_NAME}/target/symphony.war
|
||||
RUN cd ${BUILD_PATH}/${PROJECT_NAME} && \
|
||||
git checkout my && \
|
||||
mvn package -Dmaven.test.skip=true
|
||||
|
||||
# ------------------------- app container -------------------------
|
||||
FROM registry.cn-hangzhou.aliyuncs.com/kennylee/tomcat:tomcat9-jre8
|
||||
|
||||
ENV APP_DIR=/opt/tomcat/webapps/ROOT
|
||||
|
||||
COPY --from=builder /tmp/symphony/target/symphony.war /tmp/symphony.war
|
||||
|
||||
EXPOSE 8250
|
||||
|
||||
RUN mkdir -p $APP_DIR && cd $APP_DIR && jar -xvf /tmp/symphony.war
|
||||
|
||||
RUN rm -rf /opt/tomcat/webapps/manager && \
|
||||
rm -rf /opt/tomcat/webapps/host-manager
|
46
symphony/README.md
Normal file
46
symphony/README.md
Normal file
@ -0,0 +1,46 @@
|
||||
<img src="https://cloud.githubusercontent.com/assets/873584/19897669/e6a6f5ce-a093-11e6-8cf3-8e5c2acea033.png">
|
||||
|
||||
## 说明
|
||||
|
||||
### 简介
|
||||
|
||||
[Symphony](https://github.com/b3log/symphony)([ˈsɪmfəni],n.交响乐)是一个现代化的社区平台,因为它:
|
||||
|
||||
* 实现了面向内容讨论的论坛
|
||||
* 包含了面向用户分享、交友、游戏的社交网络
|
||||
* 集成了聚合独立博客的能力,共建共享优质资源
|
||||
* 并且 `100%` 开源
|
||||
|
||||
欢迎到 [Sym 官方讨论区](https://hacpai.com/register?r=88250)了解更多。
|
||||
|
||||
### 动机
|
||||
|
||||
Sym 的诞生是有如下几点原因:
|
||||
|
||||
(正版)
|
||||
|
||||
* 很多系统界面上仍然保持着老式风格,远远没有跟上时代发展的脚步,它们没有创新、好玩的特性,缺少现代化的交互元素和用户体验
|
||||
* 大部分系统是从程序员的角度进行设计的,没有考虑实际的产品、运营需求,这类系统功能过于简陋、细节不够精致、缺乏长期维护
|
||||
* 另外,我们正在探索新的社区模式,实现独奏([Solo](https://github.com/b3log/solo))与协奏([Symphony](https://github.com/b3log/symphony))相结合的[社区新体验](https://hacpai.com/b3log)
|
||||
|
||||
(野版)
|
||||
|
||||
* 万能的 GitHub 上连个能用的 Java 社区系统都找不到,Sym 填补了这个宇宙级空白
|
||||
* 做最 NB 的开源社区系统,预计几年以后 82% 的社区都将是 Sym 搭建的
|
||||
* 作者技痒,炫技之作,Ruby/Python/Node.js/(特别是)PHP 怎么能比得过 Java
|
||||
|
||||
### 更多请参见
|
||||
|
||||
* [官方中文文档](https://github.com/b3log/symphony/blob/master/README_zh_CN.md)
|
||||
* [github](https://github.com/b3log/symphony)
|
||||
|
||||
## Docker镜像说明
|
||||
|
||||
symphony镜像,从官方源码下载源码,进行构建,修改默认mysql连接地址为 `db` ,因为后面使用到的docker-compose中mysql的service名为db,并且密码为*111111*
|
||||
|
||||
docker-compose例子:
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
|
35
symphony/config/app/latke.properties
Normal file
35
symphony/config/app/latke.properties
Normal file
@ -0,0 +1,35 @@
|
||||
#
|
||||
# Symphony - A modern community (forum/SNS/blog) platform written in Java.
|
||||
# Copyright (C) 2012-2017, b3log.org & hacpai.com
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# Description: B3log Latke configurations. Configures the section "Server" carefully.
|
||||
# Version: 1.1.0.7, Sep 4, 2016
|
||||
# Author: Liang Ding
|
||||
#
|
||||
|
||||
#### Server ####
|
||||
# Browser visit protocol
|
||||
serverScheme=http
|
||||
# Browser visit domain name
|
||||
serverHost=yourdomain.com
|
||||
# Browser visit port, 80 as usual, THIS IS NOT SERVER LISTEN PORT!
|
||||
serverPort=80
|
||||
|
||||
#### Runtime Mode ####
|
||||
runtimeMode=DEVELOPMENT
|
||||
#runtimeMode=PRODUCTION
|
363
symphony/config/app/symphony.properties
Normal file
363
symphony/config/app/symphony.properties
Normal file
@ -0,0 +1,363 @@
|
||||
#
|
||||
# Symphony - A modern community (forum/SNS/blog) platform written in Java.
|
||||
# Copyright (C) 2012-2017, b3log.org & hacpai.com
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# Description: Symphony configurations.
|
||||
# Version: 1.54.0.1, Nov 20, 2017
|
||||
# Author: Liang Ding
|
||||
# Author: Bill Ho
|
||||
#
|
||||
|
||||
#### Key ####
|
||||
keyOfSymphony=dev_key
|
||||
|
||||
#### Post ####
|
||||
minStepArticleTime=10000
|
||||
minStepCmtTime=5000
|
||||
minStepChatTime=5000
|
||||
newbieFirstArticle=0
|
||||
|
||||
#### Pagination & Display ####
|
||||
defaultPaginationCnt=20
|
||||
defaultPaginationWindowSize=10
|
||||
|
||||
### Index & Side ###
|
||||
indexListCnt=12
|
||||
trendTagsCnt=18
|
||||
newTagsCnt=28
|
||||
indexArticlesCnt=15
|
||||
indexArticleParticipantsCnt=7
|
||||
latestArticlesWindowSize=10
|
||||
latestArticleParticipantsCnt=7
|
||||
sideHotArticlesCnt=10
|
||||
sideRandomArticlesCnt=10
|
||||
sideTagsCnt=28
|
||||
sideRelevantArticlesCnt=15
|
||||
sizeLatestCmtsCnt=10
|
||||
### User Home ###
|
||||
userHomeArticlesCnt=30
|
||||
userHomeArticlesWindowSize=10
|
||||
userHomeCmtsCnt=30
|
||||
userHomeCmtsWindowSize=10
|
||||
userHomeFollowingUsersCnt=30
|
||||
userHomeFollowingUsersWindowSize=10
|
||||
userHomeFollowingTagsCnt=30
|
||||
userHomeFollowingTagsWindowSize=10
|
||||
userHomeFollowingArticlesCnt=30
|
||||
userHomeFollowingArticlesWindowSize=10
|
||||
userHomeFollowersCnt=30
|
||||
userHomeFollowersWindowSize=10
|
||||
userHomePointsCnt=30
|
||||
userHomePointsWindowSize=10
|
||||
### Notifications ###
|
||||
replyNotificationsCnt=20
|
||||
replyNotificationsWindowSize=10
|
||||
atNotificationsCnt=20
|
||||
atNotificationsWindowSize=10
|
||||
commentedNotificationsCnt=20
|
||||
commentedNotificationsWindowSize=10
|
||||
followingNotificationsCnt=20
|
||||
followingNotificationsWindowSize=10
|
||||
pointNotificationsCnt=20
|
||||
pointNotificationsWindowSize=10
|
||||
broadcastNotificationsCnt=20
|
||||
broadcastNotificationsWindowSize=10
|
||||
sysAnnounceNotificationsCnt=20
|
||||
sysAnnounceNotificationsWindowSize=10
|
||||
### Article Comment ###
|
||||
articleCommentsPageSize=30
|
||||
articleCommentsWindowSize=10
|
||||
### Tags Wall ###
|
||||
tagsWallTrendCnt=30
|
||||
tagsWallColdCnt=30
|
||||
### Tag Articles ###
|
||||
tagArticlesWindowSize=10
|
||||
tagParticipantsCnt=7
|
||||
tagArticleParticipantsCnt=7
|
||||
tagRelatedTagsCnt=7
|
||||
tagRelatedWeight=1
|
||||
### City ###
|
||||
cityArticlesWindowSize=10
|
||||
cityArticleParticipantsCnt=7
|
||||
cityUuserPageSize=30
|
||||
cityUsersWindowSize=10
|
||||
### Top Ranking List ###
|
||||
topBalanceCnt=20
|
||||
topConsumptionCnt=20
|
||||
topCheckinCnt=20
|
||||
### Timeline ###
|
||||
timelineCnt=40
|
||||
### Chat Room ###
|
||||
chatRoom.msgCnt=40
|
||||
|
||||
#### Skins ####
|
||||
skinDirName=classic
|
||||
mobileSkinDirName=mobile
|
||||
|
||||
#### Default User Avatar ####
|
||||
defaultThumbnailURL=http://7xjz0r.com1.z0.glb.clouddn.com/user-thumbnail.png
|
||||
|
||||
#### Stie Visit Statistic Code ####
|
||||
siteVisitStatCode=
|
||||
|
||||
#### Qiniu ####
|
||||
qiniu.enabled=false
|
||||
|
||||
qiniu.accessKey=6zccBym_5ajLhGF1X-r1EGs_QFAqQJOrGe9o4N76
|
||||
qiniu.secretKey=7YO_Iz0vZklV0Z7xIBETyaF199_DI8qNo4wFu3sd
|
||||
qiniu.domain=http://7xjz0r.com1.z0.glb.clouddn.com
|
||||
qiniu.bucket=symphony-dev
|
||||
|
||||
upload.img.maxSize=1048576
|
||||
upload.file.maxSize=104857600
|
||||
upload.dir=./upload/
|
||||
|
||||
#### Point ####
|
||||
pointInit=500
|
||||
pointAddArticle=20
|
||||
pointUpdateArticle=5
|
||||
pointAddComment=5
|
||||
pointUpdateComment=5
|
||||
pointAddSelfArticleComment=2
|
||||
pointInviteRegister=200
|
||||
pointActivityCheckinMin=5
|
||||
pointActivityCheckinMax=20
|
||||
pointActivityCheckinStreak=200
|
||||
pointThankComment=15
|
||||
pointAddArticleBroadcast=100
|
||||
pointAddArticleReward=20
|
||||
pointAtParticipants=3
|
||||
pointStickArticle=100
|
||||
pointThankArticle=20
|
||||
stickArticleTime=1800000
|
||||
pointActivityCharacter=5
|
||||
pointDataExport=100
|
||||
pointInvitecode=100
|
||||
pointInvitecodeUsed=200
|
||||
pointActivityEatingSnake=20
|
||||
pointActivityEatingSnakeCollectMax=50
|
||||
pointPerfectArticle=100
|
||||
pointActivityGobang=1
|
||||
|
||||
pointTransferMin=3000
|
||||
pointExchangeMin=5000
|
||||
pointExchangeUnit=150
|
||||
|
||||
#### Activity ####
|
||||
activityDailyCheckinTimeMin=6
|
||||
activityDailyCheckinTimeMax=22
|
||||
|
||||
activity1A0001Closed=false
|
||||
activity1A0001LivenessThreshold=17.5
|
||||
|
||||
activitYesterdayLivenessReward.activity.perPoint=5
|
||||
activitYesterdayLivenessReward.article.perPoint=20
|
||||
activitYesterdayLivenessReward.comment.perPoint=5
|
||||
activitYesterdayLivenessReward.pv.perPoint=0.5
|
||||
activitYesterdayLivenessReward.reward.perPoint=10
|
||||
activitYesterdayLivenessReward.thank.perPoint=15
|
||||
activitYesterdayLivenessReward.vote.perPoint=5
|
||||
|
||||
activitYesterdayLivenessReward.maxPoint=300
|
||||
|
||||
#### Mail channel: sendcloud or aliyun or local ####
|
||||
mail.channel=local
|
||||
|
||||
mail.batch.articleSize=16
|
||||
|
||||
#### SendCloud Mail channel ####
|
||||
mail.sendcloud.apiUser=
|
||||
mail.sendcloud.apiKey=
|
||||
mail.sendcloud.from=account@hacpai.com
|
||||
|
||||
mail.sendcloud.batch.apiUser=
|
||||
mail.sendcloud.batch.apiKey=
|
||||
mail.sendcloud.batch.from=weekly@symphony.b3log.org
|
||||
|
||||
#### Aliyun Mail channel ####
|
||||
mail.aliyun.accessKey=
|
||||
mail.aliyun.accessSecret=
|
||||
mail.aliyun.from=account@hacpai.com
|
||||
|
||||
mail.aliyun.batch.from=weekly@symphony.b3log.org
|
||||
|
||||
#### Local Mail channel ####
|
||||
# only for mail.channel=local , config of SMTP email, eg: can use 126 or 163 SMTP proxy
|
||||
# \u8BBE\u7F6E\u4E3A debug \u6A21\u5F0F\u65F6\uFF0C\u540E\u53F0\u63A7\u5236\u53F0\u4F1A\u8F93\u51FA\u90AE\u4EF6\u53D1\u9001\u8FC7\u7A0B
|
||||
mail.local.isdebug=true
|
||||
# \u4F20\u8F93\u534F\u8BAE\u4F7F\u7528 smtp
|
||||
mail.local.transport.protocol=smtp
|
||||
# smtp \u90AE\u4EF6\u670D\u52A1\u5668
|
||||
mail.local.host=smtp.163.com
|
||||
# smtp \u7AEF\u53E3\u53F7\u8BBE\u7F6E
|
||||
mail.local.port=25
|
||||
# \u5F00\u542F\u8BA4\u8BC1
|
||||
mail.local.smtp.auth=true
|
||||
mail.local.smtp.ssl=true
|
||||
mail.local.smtp.starttls.enable=false
|
||||
# \u53D1\u9001\u8005\u7684 Email
|
||||
mail.local.smtp.sender=yourAccount@163.com
|
||||
# \u53D1\u9001\u8005\u540D\u79F0
|
||||
mail.local.smtp.username=
|
||||
# \u90AE\u4EF6\u9A8C\u8BC1\u5BC6\u7801\uFF0C126 \u7684 STMP \u670D\u52A1\u7684\u5BA2\u6237\u7AEF\u5BC6\u7801\u9700\u8981\u81EA\u5DF1\u5F00\u901A\uFF0C\u4E0D\u662F\u767B\u5F55\u5BC6\u7801\u54E6\uFF0C\u6362\u6210\u4F60\u81EA\u5DF1\u7684
|
||||
mail.local.smtp.passsword=
|
||||
# \u90AE\u4EF6\u4FDD\u5B58\u76EE\u5F55\uFF0C\u7EDD\u5BF9\u8DEF\u5F84
|
||||
mail.local.saved.eml.path=D:/
|
||||
|
||||
#### Baidu ####
|
||||
baidu.lbs.ak=
|
||||
baidu.data.token=
|
||||
baidu.yuyin.apiKey=DLQijMgdwj249khzsmFMcwUq
|
||||
baidu.yuyin.secretKey=e8b07e7f2ac9d219ef2076d1604f5e8b
|
||||
|
||||
#### BosonNLP ####
|
||||
boson.token=
|
||||
|
||||
#### Geetest ####
|
||||
geetest.enabled=false
|
||||
|
||||
geetest.id=b46d1900d0a894591916ea94ea91bd2c
|
||||
geetest.key=36fc3fe98530eea08dfc6ce76e3d24c4
|
||||
|
||||
#### Elasticsearch ####
|
||||
es.enabled=false
|
||||
es.server=http://localhost:9200
|
||||
|
||||
#### Algolia ####
|
||||
algolia.enabled=false
|
||||
algolia.appId=
|
||||
algolia.searchKey=
|
||||
algolia.adminKey=
|
||||
algolia.index=
|
||||
|
||||
#### Turing Robot ####
|
||||
turing.enabled=true
|
||||
turing.api=http://www.tuling123.com/openapi/api
|
||||
turing.key=2f53be65e323ec8e8b8ccbf42ee7ddc1
|
||||
turing.name=V
|
||||
turing.avatar=http://7xjz0r.com1.z0.glb.clouddn.com/robot_avatar.jpg
|
||||
|
||||
#### XiaoV ####
|
||||
xiaov.enabled=true
|
||||
xiaov.api=http://hpxiaov.tunnel.qydev.com
|
||||
xiaov.key=dev_key
|
||||
|
||||
#### Reserved ####
|
||||
reservedTags=Announcement,\u56DE\u6536\u7AD9
|
||||
systemAnnounce=Announcement
|
||||
reservedUserNames=admin,participants,all,Bot,someone,b3log,hacpai,api,console
|
||||
|
||||
#### White list ####
|
||||
whitelist.tags=Elasticsearch,CoffeeScript,C#
|
||||
|
||||
#### WebSocket Scheme ####
|
||||
websocket.scheme=ws
|
||||
|
||||
#### Cache ####
|
||||
cache.articleCnt=128
|
||||
cache.commentCnt=256
|
||||
|
||||
#### Performance Threshold ####
|
||||
perfromance.threshold=300
|
||||
|
||||
#### Cookie ####
|
||||
cookie.secret=BEYOND
|
||||
|
||||
#### Anonymous ####
|
||||
anonymous.point=3000
|
||||
anonymousViewSkips=/tag/*,/domains/,/tags,/statistic,/domain/*,/perfect,/recent,/hot,/timeline,/community,/member/*,\
|
||||
/api/v2/articles/**,/api/v2/domains,/api/v2/domain/*,/api/v2/tags,/api/v2/tag/*,/api/v2/user/*
|
||||
anonymousViewURIs=7
|
||||
|
||||
#### Invitecode ####
|
||||
# 3 days
|
||||
invitecode.expired=259200000
|
||||
|
||||
#### Tag ####
|
||||
tag.maxTagTitleLength=12
|
||||
|
||||
#### Forge ####
|
||||
forge.link.maxTagCnt=50
|
||||
forge.link.maxCnt=20
|
||||
forge.link.tagRefCnt=10
|
||||
|
||||
#### IPFS ####
|
||||
ipfs.dir=
|
||||
ipfs.bin=
|
||||
|
||||
#### Permission ####
|
||||
permission.rule.url./admin/ad/side.POST=adUpdateADSide
|
||||
permission.rule.url./admin/ad/banner.POST=adUpdateBanner
|
||||
permission.rule.url./admin/add-article.POST=articleAddArticle
|
||||
permission.rule.url./admin/cancel-stick-article.POST=articleCancelStickArticle
|
||||
permission.rule.url./admin/search-index-article.POST=articleReindexArticle
|
||||
permission.rule.url./admin/search/index.POST=articleReindexArticles
|
||||
permission.rule.url./admin/remove-article.POST=articleRemoveArticle
|
||||
permission.rule.url./admin/stick-article.POST=articleStickArticle
|
||||
permission.rule.url./admin/article/{articleId}.POST=articleUpdateArticleBasic
|
||||
permission.rule.url./admin/remove-comment.POST=commentRemoveComment
|
||||
permission.rule.url./admin/comment/{commentId}.POST=commentUpdateCommentBasic
|
||||
permission.rule.url./article.POST=commonAddArticle
|
||||
permission.rule.url./comment.POST=commonAddComment
|
||||
permission.rule.url./vote/down/article.POST=commonBadArticle
|
||||
permission.rule.url./vote/down/comment.POST=commonBadComment
|
||||
permission.rule.url./point/buy-invitecode.POST=commonExchangeIC
|
||||
permission.rule.url./follow/article.POST=commonFollowArticle
|
||||
permission.rule.url./follow/article-watch.POST=commonWatchArticle
|
||||
permission.rule.url./vote/up/article.POST=commonGoodArticle
|
||||
permission.rule.url./vote/up/comment.POST=commonGoodComment
|
||||
permission.rule.url./article/stick.POST=commonStickArticle
|
||||
permission.rule.url./article/thank.POST=commonThankArticle
|
||||
permission.rule.url./comment/thank.POST=commonThankComment
|
||||
permission.rule.url./article/{id}.PUT=commonUpdateArticle
|
||||
permission.rule.url./comment/{id}.PUT=commonUpdateComment
|
||||
permission.rule.url./article/{articleId}/revisions.GET=commonViewArticleHistory
|
||||
permission.rule.url./comment/{commentId}/revisions.GET=commonViewCommentHistory
|
||||
permission.rule.url./admin/add-domain.POST=domainAddDomain
|
||||
permission.rule.url./admin/domain/{domainId}/add-tag.POST=domainAddDomainTag
|
||||
permission.rule.url./admin/remove-domain.POST=domainRemoveDomain
|
||||
permission.rule.url./admin/domain/{domainId}/remove-tag.POST=domainRemoveDomainTag
|
||||
permission.rule.url./admin/domain/{domainId}.POST=domainUpdateDomainBasic
|
||||
permission.rule.url./admin/invitecodes/generate.POST=icGenIC
|
||||
permission.rule.url./admin/invitecode/{invitecodeId}.POST=icUpdateICBasic
|
||||
permission.rule.url./admin/misc.POST=miscAllowAddArticle,miscAllowAddComment,miscAllowAnonymousView,miscLanguage,miscRegisterMethod
|
||||
permission.rule.url./admin/add-reserved-word.POST=rwAddReservedWord
|
||||
permission.rule.url./admin/remove-reserved-word.POST=rwRemoveReservedWord
|
||||
permission.rule.url./admin/reserved-word/{id}.POST=rwUpdateReservedWordBasic
|
||||
permission.rule.url./admin/tag/{tagId}.POST=tagUpdateTagBasic
|
||||
permission.rule.url./admin/user/{userId}/charge-point.POST=userAddPoint
|
||||
permission.rule.url./admin/add-user.POST=userAddUser
|
||||
permission.rule.url./admin/user/{userId}/abuse-point.POST=userDeductPoint
|
||||
permission.rule.url./admin/user/{userId}/exchange-point.POST=userExchangePoint
|
||||
permission.rule.url./admin/user/{userId}/email.POST=userUpdateUserAdvanced
|
||||
permission.rule.url./admin/user/{userId}/username.POST=userUpdateUserAdvanced
|
||||
permission.rule.url./admin/user/{userId}.POST=userUpdateUserBasic
|
||||
permission.rule.url./admin.GET=menuAdmin
|
||||
permission.rule.url./admin/ad.GET=menuAdminAD
|
||||
permission.rule.url./admin/articles.GET=menuAdminArticles
|
||||
permission.rule.url./admin/comments.GET=menuAdminComments
|
||||
permission.rule.url./admin/domains.GET=menuAdminDomains
|
||||
permission.rule.url./admin/invitecodes.GET=menuAdminIcs
|
||||
permission.rule.url./admin/misc.GET=menuAdminMisc
|
||||
permission.rule.url./admin/roles.GET=menuAdminRoles
|
||||
permission.rule.url./admin/role/{roleId}/permissions.GET=menuAdminRoles
|
||||
permission.rule.url./admin/role/{roleId}/permissions.POST=menuAdminRoles
|
||||
permission.rule.url./admin/reserved-words.GET=menuAdminRWs
|
||||
permission.rule.url./admin/tags.GET=menuAdminTags
|
||||
permission.rule.url./admin/users.GET=menuAdminUsers
|
||||
|
67
symphony/config/http/default.conf
Normal file
67
symphony/config/http/default.conf
Normal file
@ -0,0 +1,67 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
#charset koi8-r;
|
||||
#access_log /var/log/nginx/log/host.access.log main;
|
||||
|
||||
# Proxying the connections connections
|
||||
|
||||
location / {
|
||||
proxy_pass http://sym:8080/;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
client_max_body_size 200m;
|
||||
#proxy_intercept_errors on;
|
||||
}
|
||||
|
||||
location /user-channel {
|
||||
proxy_pass http://sym:8080/$request_uri;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
location /timeline-channel {
|
||||
proxy_pass http://sym:8080/timeline-channel;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# proxy_pass http://127.0.0.1;
|
||||
#}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# root html;
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
# fastcgi_index index.php;
|
||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
||||
# include fastcgi_params;
|
||||
#}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
#
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
}
|
||||
|
1
symphony/database/schema.sql
Normal file
1
symphony/database/schema.sql
Normal file
@ -0,0 +1 @@
|
||||
CREATE DATABASE IF NOT EXISTS `b3log_symphony` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
|
66
symphony/docker-compose.yml
Normal file
66
symphony/docker-compose.yml
Normal file
@ -0,0 +1,66 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
&network net:
|
||||
driver: bridge
|
||||
ipam:
|
||||
driver: default
|
||||
|
||||
services:
|
||||
http:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/kennylee/tnginx
|
||||
container_name: sym-http
|
||||
restart: always
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./config/http/default.conf:/etc/nginx/conf.d/default.conf
|
||||
networks:
|
||||
- *network
|
||||
logging:
|
||||
driver: 'json-file'
|
||||
options:
|
||||
max-size: '30m'
|
||||
max-file: '1'
|
||||
depends_on:
|
||||
- app
|
||||
app:
|
||||
build: ./
|
||||
container_name: sym
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
#- ./config/server.xml:/opt/tomcat/conf/server.xml:ro
|
||||
- ./config/app/latke.properties:/opt/tomcat/webapps/ROOT/WEB-INF/classes/latke.properties:z
|
||||
- ./data/logs/:/opt/tomcat/logs/:z
|
||||
- ./data/app/upload:/opt/tomcat/upload:z
|
||||
restart: always
|
||||
environment:
|
||||
- JAVA_OPTS=-Djava.security.egd=file:///dev/urandom -server -Xms128m -Xmx1024m
|
||||
networks:
|
||||
- *network
|
||||
logging:
|
||||
driver: 'json-file'
|
||||
options:
|
||||
max-size: '30m'
|
||||
max-file: '1'
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/kennylee/mysql
|
||||
container_name: sym-db
|
||||
ports:
|
||||
- "3306"
|
||||
restart: always
|
||||
volumes:
|
||||
- ./data/mysql/:/var/lib/mysql/:rw
|
||||
- ./database/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=111111
|
||||
networks:
|
||||
- *network
|
||||
logging:
|
||||
driver: 'json-file'
|
||||
options:
|
||||
max-size: '30m'
|
||||
max-file: '1'
|
Loading…
Reference in New Issue
Block a user