newslash
Revisão | 472f254ab5889442647037055d700cfd964c4381 (tree) |
---|---|
Hora | 2018-09-28 20:28:40 |
Autor | hylom <hylom@user...> |
Commiter | hylom |
test-container: add install-test
@@ -3,6 +3,12 @@ HOST_NAME= sdtest.osdn.co.jp:5000 | ||
3 | 3 | NEWSLASH_DIR=$(shell pwd)/../ |
4 | 4 | PORT_OPTS=-p 3000:3000 |
5 | 5 | SEARCHD_DOCKERFILE=Dockerfile_for_searchd |
6 | +INSTALL_TEST_DOCKERFILE=installtest_Dockerfile | |
7 | + | |
8 | +DB_HOST=172.17.0.7 | |
9 | +REDIS_HOST=172.17.0.8 | |
10 | +APT_REPO_DIR=/var/debian-osdn/debian-osdn/srad-devel | |
11 | +APT_REPO=file:/var/local-repo ./ | |
6 | 12 | |
7 | 13 | build-base: Dockerfile files |
8 | 14 | docker build $(DOCKER_OPTS) -t newslash-base . |
@@ -16,6 +22,18 @@ searchd: $(SEARCHD_DOCKERFILE) files | ||
16 | 22 | searchd-run: |
17 | 23 | docker run -ti --rm -p 6000:6000 -v $(NEWSLASH_DIR):/var/newslash newslash-searchd-base bash |
18 | 24 | |
25 | +install-test-env: $(INSTALL_TEST_DOCKERFILE) files | |
26 | + docker build $(DOCKER_OPTS) -f $< -t newslash-install-test . | |
27 | + | |
28 | +install-test: | |
29 | + docker run -ti --rm -v $(APT_REPO_DIR):/var/local-repo \ | |
30 | + --add-host srad-test-db:$(DB_HOST) \ | |
31 | + --add-host newslash-redis:$(REDIS_HOST) \ | |
32 | + -v $(shell pwd)/newslash.conf:/etc/newslash/newslash.conf \ | |
33 | + -e APT_REPO="$(APT_REPO)" \ | |
34 | + -p 8000:80 \ | |
35 | + newslash-install-test bash | |
36 | + | |
19 | 37 | build-k8s-test: |
20 | 38 | docker build -f Dockerfile_k8s $(DOCKER_OPTS) -t $(HOST_NAME)/osdn/newslash-test . |
21 | 39 |
@@ -0,0 +1,13 @@ | ||
1 | +#!/bin/bash | |
2 | +set -eo pipefail | |
3 | + | |
4 | +echo deb $APT_REPO > /etc/apt/sources.list.d/local-repo.list | |
5 | +apt-get update | |
6 | +apt-get install -y --allow-unauthenticated newslash-sradjp | |
7 | + | |
8 | +hypnotoad /usr/share/newslash/script/newslash_web | |
9 | + | |
10 | +if [ "$1" != "" ]; then | |
11 | + exec "$@" | |
12 | +fi | |
13 | + |
@@ -0,0 +1,7 @@ | ||
1 | +FROM newslash-base | |
2 | + | |
3 | +COPY files/install-test-entrypoint.sh /entrypoint.sh | |
4 | +RUN chmod 755 /entrypoint.sh | |
5 | +ENTRYPOINT [ "/entrypoint.sh" ] | |
6 | + | |
7 | +EXPOSE 80 |
@@ -0,0 +1,154 @@ | ||
1 | +--- | |
2 | +#BasicAuth: | |
3 | +# enable: 1 | |
4 | +# username: 'osdn' | |
5 | +# password: 'Sfsd7573' | |
6 | +# message: this is newslash | |
7 | + | |
8 | +hypnotoad: | |
9 | + listen: | |
10 | + - http://0.0.0.0:80 | |
11 | + - https://0.0.0.0:443?cert=/etc/letsencrypt/live/test.srad.jp/cert.pem&key=/etc/letsencrypt/live/test.srad.jp/privkey.pem | |
12 | + pid_file: /var/run/newslash/newslash.pid | |
13 | + | |
14 | +Site: | |
15 | + name: srad | |
16 | + root: "/" | |
17 | + base_url: https//test.srad.jp | |
18 | + description: yet another srad | |
19 | + img_path: "/img" | |
20 | + css_path: "/css" | |
21 | + topic_icon_base_url: "/img/topic_icon" | |
22 | + | |
23 | +ReCaptcha: | |
24 | + site_key: 6LcPlyIUAAAAAN2d4Gw4q2DWLtFCDYmn5tSVqS3w | |
25 | + secret_key: 6LcPlyIUAAAAAIlTdXjw3tIz_U-lUwW45RudOXfR | |
26 | + | |
27 | +ACL: | |
28 | + exclude: ["^/img/", "^/css/", "^/js/", "^/static/", "^/login", "^/logout", "^/banned"] | |
29 | + | |
30 | +Search: | |
31 | + searchd_host: 127.0.0.1 | |
32 | + searchd_port: 6000 | |
33 | + | |
34 | +Searchd: | |
35 | + index_path: /var/newslash/lucene_index | |
36 | + | |
37 | +Polls: | |
38 | + TTL: 120 | |
39 | + TTL_unit: "days" | |
40 | + | |
41 | +Preprocessor: | |
42 | + targets: | |
43 | + css/newslash.css: | |
44 | + source: css/newslash.less | |
45 | + type: less | |
46 | + less: | |
47 | + command: /usr/bin/nodejs | |
48 | + content-type: text/css | |
49 | + options: | |
50 | + - "--no-deprecation" | |
51 | + - /usr/bin/lessc | |
52 | + - "--include-path=./css" | |
53 | + - "--no-color" | |
54 | + - "-" | |
55 | + | |
56 | +JavaScriptLoader: | |
57 | + source_directory: public/js | |
58 | + mode: production | |
59 | + | |
60 | +FeedFetcher: | |
61 | + fetch_timeout: 5 | |
62 | + http_proxy: http://proxy:8080/ | |
63 | + https_proxy: http://proxy:8080/ | |
64 | + | |
65 | +System: | |
66 | + secret_key: njknQNIODGinkladf | |
67 | + session_store: kvs | |
68 | + salt: '' | |
69 | + readonly: 0 | |
70 | + | |
71 | +Repository: | |
72 | + path: /var/newslash/repository | |
73 | + | |
74 | +Log: | |
75 | + access_log: | |
76 | + local_file: /var/log/newslash/access.log | |
77 | + mode: local_file | |
78 | + autoflush: 1 | |
79 | + system_log: | |
80 | + local_file: /var/log/newslash/newslash.log | |
81 | + level: info | |
82 | + mode: local_file | |
83 | + | |
84 | +Analytics: | |
85 | + tag: "UA-739864-18" | |
86 | + | |
87 | +Story: | |
88 | + title_max_byte: 100 | |
89 | + | |
90 | +IndexPage: | |
91 | + story_per_page: 10 | |
92 | + | |
93 | +Timeline: | |
94 | + popular_period: { hours: 6 } | |
95 | + item_per_page: 20 | |
96 | + | |
97 | +Database: | |
98 | + host: srad-test-db | |
99 | + name: slash | |
100 | + user: slash | |
101 | + password: hoge | |
102 | + | |
103 | +KeyValueStore: | |
104 | + type: redis | |
105 | + host: newslash-redis:6379 | |
106 | + | |
107 | +Legacy: | |
108 | + memcached: sd-master:11211 | |
109 | + | |
110 | +Faculties: | |
111 | + comments: | |
112 | + 1000: [ipid, subnetid] | |
113 | + metamoderations: | |
114 | + 1000: [uid] | |
115 | + moderations: | |
116 | + 1000: [ipid, subnetid, uid, m2uid] | |
117 | + stories: | |
118 | + 1000: [hits, hitparade] | |
119 | + submissions: | |
120 | + 1000: [ipid, subnetid, note, comment] | |
121 | + | |
122 | +Editor: | |
123 | + allowed_tags: | |
124 | + b: [] | |
125 | + i: [] | |
126 | + p: [] | |
127 | + br: [] | |
128 | + a: | |
129 | + - href | |
130 | + ol: | |
131 | + - start | |
132 | + ul: [] | |
133 | + li: [] | |
134 | + dl: [] | |
135 | + dt: [] | |
136 | + dd: [] | |
137 | + em: [] | |
138 | + strong: [] | |
139 | + tt: [] | |
140 | + blockquote: | |
141 | + - title | |
142 | + - cite | |
143 | + div: [] | |
144 | + ecode: [] | |
145 | + del: [] | |
146 | + ins: [] | |
147 | + sub: [] | |
148 | + sup: [] | |
149 | + quote: [] | |
150 | + strike: [] | |
151 | + | |
152 | +Hsts: | |
153 | + redirect_non_ssl: 0 | |
154 | + |