+++ /dev/null
-load("@bazel_tools//tools/build_defs/docker:docker.bzl", "docker_build")
-
-genrule(
- name = "jessie_mojolicious",
- srcs = [
- "Dockerfile",
- "newslash.cnf",
- ],
- outs = ["jessie_mojolicious.tar"],
- cmd = "pushd $$(dirname $(location Dockerfile)) && docker build -t osdn/jessie_mojolicious . && popd && docker save osdn/jessie_mojolicious > $@",
- local = 1,
-)
-
-docker_build(
- name = "jessie",
- base = ":jessie_mojolicious",
- ports = ["80"],
- debs = ["//debian:newslash-deb"],
- files = ["entrypoint.sh"],
- mode = "0755",
- repository = "osdn",
- visibility = ["//visibility:public"],
- cmd = ["newslash_web"],
- entrypoint = ["/entrypoint.sh"],
-)
-
RUN apt-get install -y pylucene python-mysql.connector liblucene4.10-java libasm-java
RUN apt-get install -y python-yaml
+# for develop
+RUN apt-get install -y libdevel-nytprof-perl
+
# install custom pylucene package
COPY files/$PYLUCENE_DEB /tmp
RUN dpkg -i /tmp/$PYLUCENE_DEB
COPY files/newslash.cnf /etc/mysql/conf.d/
EXPOSE 80
-# for develop
-RUN apt-get install -y libdevel-nytprof-perl
+++ /dev/null
-FROM debian:jessie
-MAINTAINER hirom@osdn.jp
-
-RUN apt-get update -y
-RUN apt-get install -y vim-nox lv less
-RUN apt-get install -y libmojolicious-perl libjs-bootstrap libdbd-mysql libdbi-perl \
- libdbd-mysql-perl libtemplate-perl node-less libcrypt-openssl-random-perl \
- libemail-valid-perl tinymce libredis-perl libhtml-tidy-perl liburi-perl \
- libyaml-perl libdatetime-format-mysql-perl
-
-# slash's dependency
-RUN apt-get install -y libdate-calc-perl libdatetime-perl liburi-perl libjson-perl \
- libcache-memcached-fast-perl libdata-javascript-anon-perl libwww-perl
-
-COPY files/newslash.cnf /etc/mysql/conf.d/
-
-EXPOSE 80
-
-FROM debian:stretch
-ENV PYLUCENE_DEB=python-lucene_4.10.1+osdn-1_amd64.deb
-
-# install basic packages
-RUN apt-get update -y
-RUN apt-get install -y vim-nox lv less
-
-# install mojolicious related packages
-RUN apt-get install -y libmojolicious-perl libjs-bootstrap libdbd-mysql libdbi-perl \
- libdbd-mysql-perl libtemplate-perl node-less libcrypt-openssl-random-perl \
- libemail-valid-perl tinymce libredis-perl libhtml-tidy-perl liburi-perl \
- libyaml-perl libdatetime-format-mysql-perl libdatetime-format-iso8601-perl \
- libxml-feed-perl libcarp-always-perl libcrypt-eksblowfish-perl
-
-# install slash's dependency
-RUN apt-get install -y libdate-calc-perl libdatetime-perl liburi-perl libjson-perl \
- libcache-memcached-fast-perl libdata-javascript-anon-perl libwww-perl
-
-# install python and lucene packages
-RUN apt-get install -y pylucene python-mysql.connector liblucene4.10-java libasm-java python-yaml
+FROM newslash-base:latest
# install jenkins related packaged
RUN apt-get install -y openjdk-8-jdk openssh-server
COPY files/jenkins.pub /root/.ssh/authorized_keys
RUN chmod 600 /root/.ssh/authorized_keys
-# install custom pylucene package
-COPY files/$PYLUCENE_DEB /tmp
-RUN dpkg -i /tmp/$PYLUCENE_DEB
-
# copy config file
COPY files/newslash.cnf /etc/mysql/conf.d/
--- /dev/null
+TAG_NAME=newslash-base
+HOST_NAME= sdtest.osdn.co.jp:5000
+
+build-base: Dockerfile files
+ docker build $(DOCKER_OPTS) -t newslash-base .
+
+build-k8s-test:
+ docker build -f Dockerfile_k8s $(DOCKER_OPTS) -t $(HOST_NAME)/osdn/newslash-test .
+
+build-searchd-base: Dockerfile_for_searchd
+ docker build -f Dockerfile_for_searchd $(DOCKER_OPTS) -t ns_searchd .
+
+push:
+ docker push $(HOST_NAME)/osdn/newslash-test
+
+run-newslash-dev:
+ kubectl apply -f k8s-newslash-dev.yaml
+++ /dev/null
-docker build -t stretch_mojolicious .
+++ /dev/null
-apiVersion: v1
-kind: Service
-metadata:
- name: ns-searchd
-spec:
- clusterIP: 10.254.100.110
- type: ClusterIP
- ports:
- - port: 6000
- protocol: TCP
- name: ns-searchd
- selector:
- app: ns-searchd
+++ /dev/null
----
-BasicAuth:
- enable: 0
- username: ''
- password: ''
- message: test server
-
-hypnotoad:
- listen:
- - https://*:8000?cert=/var/certs/live/sdtest.osdn.co.jp/cert.pem&key=/var/certs/live/sdtest.osdn.co.jp/privkey.pem
-
-Site:
- name: sdtest
- root: "/"
- base_url: http://sdtest.osdn.co.jp:3000
- description: yet another news site
- img_path: "/img"
- css_path: "/css"
- topic_icon_base_url: "/img/topic_icon"
-
-ReCaptcha:
- site_key: 6LcPlyIUAAAAAN2d4Gw4q2DWLtFCDYmn5tSVqS3w
- secret_key: 6LcPlyIUAAAAAIlTdXjw3tIz_U-lUwW45RudOXfR
-
-ACL:
- exclude: ["^/img/", "^/css/", "^/js/", "^/static/", "^/login", "^/logout", "^/banned"]
-
-Search:
- searchd_host: ns_searchd
- searchd_port: 6000
-
-Polls:
- TTL: 730
- TTL_unit: "days"
- vote_cooling_seconds: 300
-
-CSSCompile:
- source_dir: css
- dest_dir: public/css
- lessc: "/usr/bin/lessc"
-
-QuasiStaticContent:
- targets:
- css/main.css:
- source: css/main.less
- type: less
- css/bootstrap.css:
- source: css/bootstrap.less
- type: less
- less:
- command: /usr/bin/lessc
- content-type: text/css
- options:
- - include-path: ./css
- - "-"
-
-JavaScriptLoader:
- source_directory: public/js
- mode: production
-
-FeedFetcher:
- fetch_timeout: 5
-# http_proxy:
-# https_proxy:
-
-System:
- secret_key: secret strings for hasing
- session_store: kvs
- salt: ''
- readonly: 0
-
-Repository:
- path: /var/newslash/repository
-
-Log:
- #debug: 1
- access_log: /var/log/newslash/access.log
- #local_file: 1
- #level: debug
- #system_log: /tmp/newslash.log
- backtrace: 0
-
-Analytics:
- tag: "UA-739864-18"
-
-Story:
- title_max_byte: 100
-
-IndexPage:
- story_per_page: 10
-
-Timeline:
- popular_period: { years: 2 }
- item_per_page: 20
-
-Database:
- host: sd-db
- name: slash
- user: slash
- password: hoge
-
-MemoryCache:
- test_mode: 0
-
-KeyValueStore:
- type: redis
- host: newslash-redis:6379
- test_mode: 0
-
-Legacy:
- memcached: sd-master:11211
-
-Faculties:
- comments:
- 1000: [ipid, subnetid]
- metamoderations:
- 1000: [uid]
- moderations:
- 1000: [ipid subnetid uid m2uid]
- stories:
- 1000: [hits hitparade]
- submissions:
- 1000: [ipid subnetid note comment]
-
-Editor:
- allowed_tags:
- b: []
- i: []
- p: []
- br: []
- a:
- - href
- ol:
- - start
- ul: []
- li: []
- dl: []
- dt: []
- dd: []
- em: []
- strong: []
- tt: []
- blockquote:
- - title
- - cite
- div: []
- ecode: []
- del: []
- ins: []
- sub: []
- sup: []
- quote: []
- strike: []
-
-Hsts:
-# redirect_non_ssl: 1
--- /dev/null
+docker build $@ -t stretch_mojolicious .
-docker build -f Dockerfile_for_jenkins -t stretch_mojolicious_runtest .
+docker build -f Dockerfile_for_jenkins -t stretch_mojolicious_runtest $@ .