さくらインターネットでVPSを契約
基本環境はCentOS7を選択
nginx インストール
yum -y install nginx
marina dbをインストール
yum install mariadb-server
systemctl enable mariadb
systemctl start mariadb
Node.js インストール
curl -L git.io/nodebrew | perl - setup
echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile
nodebrew install-binary stable
nodebrew use stable
strapiのインストール
npm install strapi@alpha -g
cd /usr/share/nginx/html
strapi new blog
nginxの設定の追加
/etc/nginx/nginx.conf
location/{proxy_passhttp://localhost:1337;proxy_http_version1.1;proxy_set_headerUpgrade$http_upgrade;proxy_set_headerConnection'upgrade';proxy_set_headerHost$host;proxy_cache_bypass$http_upgrade;}
pm2による自動起動の設定
https://qiita.com/kuryus/items/fbdc373f23d3236ebb04
nuxtのプロジェクト作成
$ yarn create nuxt-app my_blog
yarn create v1.15.2
[1/4] 🔍 Resolving packages...
warning create-nuxt-app > sao > download-git-repo > download > mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
warning create-nuxt-app > sao > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning create-nuxt-app > sao > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
warning Your current version of Yarn is out of date. The latest version is "1.22.4", while you're on "1.15.2".
info To upgrade, run the following command:
$ brew upgrade yarn
success Installed "create-nuxt-app@2.15.0" with binaries:
- create-nuxt-app
create-nuxt-app v2.15.0
✨ Generating Nuxt.js project in my_blog
? Project name my_blog
? Project description My world-class Nuxt.js project
? Author name Rickey
? Choose programming language JavaScript
? Choose the package manager Yarn
? Choose UI framework Vuetify.js
? Choose custom server framework None (Recommended)
? Choose Nuxt.js modules Axios
? Choose linting tools ESLint
? Choose test framework None
? Choose rendering mode Universal (SSR)
? Choose development tools (Press <space> to select, <a> to toggle all, <i> to invert selection)
Netlifyの登録
https://qiita.com/isihigameKoudai/items/e3b136e9964f1d30d73d
https://ja.unflf.com/tech/netlify/route53/