Skip to content

Instantly share code, notes, and snippets.

@sunny4381
Created June 22, 2021 11:06
Show Gist options
  • Save sunny4381/5624280890485410698f668290876df3 to your computer and use it in GitHub Desktop.
Save sunny4381/5624280890485410698f668290876df3 to your computer and use it in GitHub Desktop.
#!/bin/bash
port=3000
bundle exec rake db:drop
rm -rf private public
git checkout -- private public
bundle exec rake db:create_indexes
bundle exec rake ss:create_site data="{ name: '自治体サンプル', host: 'www', domains: 'www.example.jp:$port', mypage_domain: 'localhost:$port', map_api: 'openlayers' }"
bundle exec rake ss:create_site data="{ name: '企業サンプル', host: 'company', domains: 'company.example.jp:$port', mypage_domain: 'localhost:$port', map_api: 'openlayers' }"
bundle exec rake ss:create_site data="{ name: '子育て支援サンプル', host: 'childcare', domains: 'childcare.example.jp:$port', mypage_domain: 'localhost:$port', map_api: 'openlayers' }"
bundle exec rake ss:create_site data="{ name: 'オープンデータ', host: 'opendata', domains: 'www.example.jp:$port', mypage_domain: 'localhost:$port', map_api: 'openlayers', subdir: 'opendata', parent_id: 1 }"
bundle exec rake ss:create_site data="{ name: 'LPサンプル', host: 'lp_', domains: 'lp.example.jp:$port', mypage_domain: 'localhost:$port', map_api: 'openlayers' }"
bundle exec rake db:seed site=www name=demo
bundle exec rake db:seed site=company name=company
bundle exec rake db:seed site=childcare name=childcare
bundle exec rake db:seed site=opendata name=opendata
bundle exec rake db:seed site=lp_ name=lp
bundle exec rake db:seed name=gws
bundle exec rake db:seed name=webmail
bundle exec rake cms:set_subdir_url site=opendata
find public/sites/ -name '*.html' -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment