Skip to content

Latest commit

 

History

History
108 lines (73 loc) · 4.8 KB

README.md

File metadata and controls

108 lines (73 loc) · 4.8 KB

Tokyo COVID-19 Task Force website

Tokyo COVID-19 Task Force website

How to Contribute

All contributions are welcome! Please check How to contribute for details.

Code of Conduct

Please check Code of conduct for developers for details.

License

This software is released under the MIT License.

For Translators

Please check How to translate doc.

For Developers

How to Set Up Environments

  • Required Node.js version: 10.19.0 or higher

Use yarn

# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

Use docker

# serve with hot reload at localhost:3000
$ docker-compose up --build

How to resolve Cannot find module **** error

Use yarn

$ yarn install

Use docker

$ docker-compose run --rm app yarn install

When developing with VSCode + Remote Containers

  1. The VSCode extension "Remote Development" is introduced.
  2. If you select the “Open Folder in Container” root of this repository (as seen in the lower left here(external site)), the environment construction will start.

Notes

  • If you want to change the settings, modify '.devcontainer/devcontainer.json '. Please refer to devcontainer.json reference for more details.
  • The extension "ESLint" is only valid when executing Remote Container. Please add it to the 'extensions ' of 'devcontainer.json ' if necessary.
  • A detailed procedure can be found [here(external site)] (https://code.visualstudio.com/docs/remote/containers#_managing-extensions).
  • When rebuilding the development environment, please execute “Rebuild Container” which can be found at the lower left.

Detect production/others environment

On the production environment, 'production' is assigned to process.env.GENERATE_ENV variable, on the other case 'development' is assigned to the variable.
Please use the variable to detect which enviroinment is used at the runtime.

Deployment to Staging & Production Environments

When master branch is updated, the HTML files will be automatically built onto production branch, and then the production site (https://stopcovid19.metro.tokyo.lg.jp/) will be also updated.

When staging branch is updated, the HTML files will be automatically built onto gh-pages branch, and then the staging site (https://stg-covid19-tokyo.netlify.com/) will be also updated.

When development branch is updated, the HTML files will be automatically built onto dev-pages branch, and then the development site (https://dev-covid19-tokyo.netlify.com/) will be also updated.

Branch rules

Pull Request is allowed only for development and dev-hotfix. Please use the following naming rules for the branch when sending a Pull Request.

Feature implementation: feature/#{ISSUE_ID}-#{branch_title_name}
Hotfix commit: hotfix/#{ISSUE_ID}-{branch_title_name}

Basic branch

Purpose Branch Confirmation URL Remarks
Development development https://dev-covid19-tokyo.netlify.com/ base branch. Basically send a Pull Request here
Hotfix branch dev-hotfix None Fixes that should be applied to production in haste. Use this if requested by the administrator
Staging staging https://stg-covid19-tokyo.netlify.com/ For final confirmation before production. Non-admin pull requests are prohibited
Production master https://stopcovid19.metro.tokyo.lg.jp/ Pull Requests other than Administrators are prohibited

Branch used by the system

Purpose Branch Confirmation URL Remarks
Production site HTML production https://stopcovid19.metro.tokyo.lg.jp/ Location where statically built HTML is located
Staging site HTML gh-pages https://stg-covid19-tokyo.netlify.com/ Where to find statically built HTML
For OGP working directory deploy / new_ogp None For updating OGP