GithubHelp home page GithubHelp logo

shngmsw / stat.ink Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fetus-hina/stat.ink

0.0 1.0 0.0 14.49 MB

https://stat.ink/

License: MIT License

Dockerfile 0.08% Makefile 0.53% PHP 91.79% Python 0.01% Shell 0.02% JavaScript 2.96% CSS 0.38% Batchfile 0.02% Smarty 4.22%

stat.ink's Introduction

stat.ink

Yii2 MIT License StyleCI

Source codes for https://stat.ink/

IkaLog, SquidTracks, splatnet2statink 等の対応ソフトウェア、または自作のソフトウェアと連携することで Splatoon の戦績を保存し、統計を取ります。

バグレポート BUG REPORT

バグレポートは日本語で大丈夫です。開発者は日本語しかまともに使えない日本人です。

I'll accept your bug report in English or Japanese.
The administrator is not goot at English. Please use easy English.

問題がセキュリティにかかわるものであれば、非公開の方法を利用してください。
Use a private channel if it is a security issue.

REQUIREMENTS

  • PHP 7.1+
    • Doesn't work with 7.0 or lower. (Uses statements added in v7.1)
  • PostgreSQL 9.5+ (Recommended: 10+)
    • Doesn't work with 9.4 or lower. (Uses features added in v9.5)
  • Gearman
  • ImageMagick (convert)
  • Node.js (npm)
    • Recommended: 6.x or 7.x
  • jpegoptim
  • pngcrush
  • Brotli (bro)

https://stat.ink/ works with:

  • CentOS 7.4.1708 (x86-64)
  • EPEL
    • gearmand
  • JP3CKI Repository
  • Remi's RPM repository
    • remi-safe repository, it uses SCL mechanism
      • PHP 7.2.*
        • php72-php-cli
        • php72-php-fpm
        • php72-php-gd
        • php72-php-intl
        • php72-php-mbstring
        • php72-php-mcrypt
        • php72-php-pdo
        • php72-php-pecl-gearman
        • php72-php-pecl-msgpack
        • php72-php-pgsql

※CentOS 7 の標準 PHP は 5.4.16 です。このバージョンでは動作しません。
 PHP 7.1 で追加された機能を使用しています(TheClass::class、匿名クラス、戻り型のnullableつきのヒントなど)

※CentOS 7 の標準 PostgreSQL のバージョンは 9.2.14 です。このバージョンでは動作しません。
 PgSQL 9.5 で追加された機能を使用しています(jsonb 型、UPSERT など)
 実際のサーバでは PgSQL 10 を使用していますが、現時点では 9.5 で充分動作するはずです。
 ただし、将来必要が生じた場合はためらわずに PgSQL 10 (以降) に依存させます。

使い方 HOW TO USE (DEVELOPER)

SETUP

開発環境の作り方 / How to setup a development environment

Dockerfile を見ても構築の手順が記載されています(Dockerfile は自動化と docker の仕組みの都合上、かなり無理矢理やっている箇所があります)

UPDATE

こういうことをやればよさそうな気がします。何をやっているか確認したあと実行してください。

git fetch --all && \
  git merge --ff-only origin/master && \
  ./composer.phar install && \
  make && \
  rm -rfv web/assets/* runtime/Smarty/compile/*

assets の中身や compile の中身は消さなくても動くことがありますが、動かないこともあるので消す事をおすすめします。

なお、assets ディレクトリ自体を消してしまった場合は実行エラーが発生しますので中身だけ消してください。

DOCKER

テスト環境構築用の Dockerfile が同梱されています。あるいは、Docker Hub の jp3cki/statink でビルド済みのイメージが取得できます。

主要なソフトウェアのバージョンが合わせてあるため、本番環境とほぼ同じ環境ができあがるはずです。

データの永続化に関する配慮は一切ありません。つまり、コンテナを起動する度にユーザやバトルは全部消えます。

自分でイメージを作成する場合、現在の作業ディレクトリの中身が /home/statink/stat.ink にデプロイされます。その際 vendor などは一度消され、再構成されます。

コンテナを起動すると 80/TCP で H2O が待ち受けています。ここへ接続して使用します。必要であれば docker run する時に -p 8080:80 のように任意のポートにマップしてください。

※Docker の本来のポリシーに反して、1アプリケーション1コンテナの形式になっています(内部で複数のdaemonが動作します)。

※永続化のためのヒント:

  • /home/statink/stat.ink/config
  • /home/statink/stat.ink/web/images
  • /var/opt/rh/rh-postgresql95/lib/pgsql/data

自分で永続化したことがないのでうまく行くかは知りません。

API

stat.ink にデータを投稿する、または取得する API は次のページを参照してください。

ライセンス LICENSE

The MIT License (MIT)

Copyright (c) 2015-2017 AIZAWA Hina <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

ライセンス(アプリケーションテンプレート)

The Yii framework is free software. It is released under the terms of
the following BSD License.

Copyright © 2008 by Yii Software LLC (http://www.yiisoft.com)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

 * Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in
   the documentation and/or other materials provided with the
   distribution.
 * Neither the name of Yii Software LLC nor the names of its
   contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

ライセンス(ドキュメント類) LICENSE (DOCUMENTS)

CC-BY 4.0

ドキュメント類のライセンスはCreative Commons - 表示 4.0 国際の下にライセンスされています。

Documents of stat.ink project are licensed under a Creative Commons Attribution 4.0 International License.

stat.ink's People

Contributors

fetus-hina avatar allenpestaluky avatar hasegaw avatar allenwp avatar deathmetalland avatar ykws avatar mntone avatar wkoichi avatar 7185 avatar shngmsw avatar thejanzap avatar ydkk avatar frozenpandaman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.