8000 Distribution · uupaa/WebApp2 Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Distribution

uupaa edited this page May 30, 2017 · 5 revisions

WebApp/2 ベースの WebApplication (MyWebApp) を、開発環境以外の場所(動作確認環境)で動作確認するための手順について説明します。

  1. MyWebApp をフォルダごと zip し、動作確認環境で展開します

    • 自己署名証明書( conf/webapp2-server.{crt|csr|key} ) も一緒にコピーして渡してください
  2. 動作確認環境に Docker をインストールします

  3. 必要に応じて Chrome Canary をインストールします

    • Chrome Canary をインストールします
    • Chrome Canary で chrome://flags/#enable-experimental-web-platform-features にアクセスし Experimental Web Platform features有効にする をクリックした後に 今すぐ再起動 で Chrome を再起動します
  4. DockerImage を作成し、コンテナを起動します

    • 動作確認環境で node.js(npm) が利用できる場合は、以下のコマンドを実行してください

      cd MyWebApp
      npm run build:image
      npm start
    • node.js(npm) が利用できない場合は、以下の Docker コマンドを直接実行してください

      cd MyWebApp
      docker build -t webapp2-nginx .
      docker run --name app -d -p 80:80 -p 443:443 -v $(pwd)/app:/usr/share/nginx/html/app:ro webapp2-nginx
  5. Chrome Canary を起動し、 https://localhost/app にアクセスします。

    • CORS アクセスが必要な場合は、一度全ての Chrome Canary を終了させ、以下のコマンドで Chrome Canary を起動してから https://localhost/app にアクセスしてください

      open -a Google\ Chrome\ Canary --args --allow-cross-origin-auth-prompt --disable-web-security --user-data-dir ~/ --flag-switches-begin --enable-experimental-web-platform-features --flag-switches-end

インストールの方法や設定の方法で不明な点がありましたら Docker, Chrome, CORS を参照してください。

0