Skip to content

Commit

Permalink
merge with dockerfile (Ptt-official-app#15)
Browse files Browse the repository at this point in the history
* Dockerfile based on bbsdocker/imageptt

1. config with 01-config-docker.go.template and 01-config.docker.ini
2. Shm.Raw to calculate offset correctly.
3. scripts for docker_build.sh and docker_run.sh

* pass tests

* config

* config

* config
  • Loading branch information
chhsiao1981 authored Nov 26, 2020
1 parent 9da66f0 commit ca050c0
Show file tree
Hide file tree
Showing 49 changed files with 1,557 additions and 822 deletions.
12 changes: 7 additions & 5 deletions 00-config.template.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[go-bbs]
HTTP_HOST = localhost:3456

[ptttype]
SERVICE_MODE = DEV # can be: DEV / PRODUCTION / DEBUG

# //////////
#// make.conf
#//////////
BBSHOME = ./go-bbs/testcase # /* BBS home-dir. */

#//////////
#// pttbbs.conf
#//////////
#/* 定義 BBS 站名位址 */
BBSNAME = 新批踢踢 # # /* 中文站名 */
BBSENAME = PTT2 # /* 英文站名 */
Expand Down Expand Up @@ -219,7 +220,6 @@ INSCREEN =

# //////////
# // config.h
# //////////
BBSPROGPOSTFIX = /bin/mbbsd # /* 主程式 */
BBSPROG = BBSHOME + BBSPROGPOSTFIX # /* 主程式 */
BAN_FILE = BAN # /* 關站通告檔 */
Expand Down Expand Up @@ -462,7 +462,6 @@ SHOW_IDLE_TIME = true # /* 顯示閒置時間 */

# //////////
# // common.h
# //////////
SZ_RECENTLOGIN = 16000 # // size of max recent log before rotation
SZ_RECENTPAY = 16000

Expand All @@ -479,12 +478,15 @@ SAFE_ARTICLE_DELETE_NUSER = 2

# //////////
# // proto.h
# //////////
USE_COMMENTD = false
USE_EMAILDB = false
USE_REGCHECKD = false
USE_VERIFYDB = false

# //////////
# //addition
IS_NEW_SHM = true

# //////////
# //////////
# // types
Expand Down
47 changes: 47 additions & 0 deletions 01-config-docker.go.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// +build production

package ptttype

const (
// These are special config variables requiring to be const.
// copy to ptttype/00-config-production.go to setup production config.
//
// type struct requires const.
MAX_USERS = 100 /* 最高註冊人數 */

MAX_ACTIVE = 31 /* 最多同時上站人數 */

MAX_BOARD = 1024 /* 最大開板個數 */

//////////
//config.h
//////////
HASH_BITS = 16 /* userid->uid hashing bits */

MAX_FRIEND = 256 /* 載入 cache 之最多朋友數目 */

MAX_REJECT = 32 /* 載入 cache 之最多壞人數目 */

MAX_MSGS = 10 /* 水球(熱訊)忍耐上限 */

MAX_ADBANNER = 500 /* 最多動態看板數 */

HOTBOARDCACHE = 10 /* 熱門看板快取 */

MAX_FROM = 300 /* 最多故鄉數 */

MAX_REVIEW = 7 /* 最多水球回顧 */

NUMVIEWFILE = 14 /* 進站畫面最多數 */

MAX_ADBANNER_SECTION = 10 /* 最多動態看板類別 */

MAX_ADBANNER_HEIGHT = 11 /* 最大動態看板內容高度 */

/////////////////////////////////////////////////////////////////////////////
// OS Settings 作業系統相關設定

MAXPATHLEN = 256

PATHLEN = 256
)
Loading

0 comments on commit ca050c0

Please sign in to comment.