gihyo.jp/book/2018/978-4-7741-9744-9
GitLabでなぜかforce pushできない
こうなった
git push origin master --force Counting objects: 15, done. Delta compression using up to 4 threads. Compressing objects: 100% (15/15), done. Writing objects: 100% (15/15), 2.18 KiB | 1.09 MiB/s, done. Total 15 (delta 8), reused 0 (delta 0) remote: GitLab: You are not allowed to force push code to a protected branch on this project. To gitlab.com:shinriyo/monkey.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'git@gitlab.com:shinriyo/monkey.git'
なぜ? 設定上自分はメンテナっぽいのに。
公式ドキュメント https://docs.gitlab.com/ee/user/project/protected_branches.html
設定の歯車 => 「リポジトリ」を選択する
ここで選んで「Unprotect」
git push origin master --force Counting objects: 15, done. Delta compression using up to 4 threads. Compressing objects: 100% (15/15), done. Writing objects: 100% (15/15), 2.18 KiB | 1.09 MiB/s, done. Total 15 (delta 8), reused 0 (delta 0) To gitlab.com:shinriyo/monkey.git + 249c755...c0f2766 master -> master (forced update)
yay!
LambdaでPythonのlxmlを使う
Pythonだけでなく、OS依存っぽいので面倒ですね。
Python Data Deployment on AWS Lambda – Nervous Systems
Using Python’s LXML in Amazon Lambda - Azavea - Beyond Dots on a Map
↑のこれらが嫌なら、
↓これをzipにいれるといいかも? github.com
- 作者: Peter Sbarski,吉田真吾,長尾高弘
- 出版社/メーカー: 翔泳社
- 発売日: 2018/03/14
- メディア: 単行本(ソフトカバー)
- この商品を含むブログ (1件) を見る
Nuxt.jsとFirebaseでSPA×SSR×PWA×サーバーレスを実現するの記事のメモ
https://inside.dmm.com/entry/2018/04/10/nuxt-firebase
// サーバー起動 $ npm run start
をする時、Projectトップではない。
src
の中
firebase initのメモ
You're about to initialize a Firebase project in this directory: /Users/shinriyo/development/vue_apps/proj_name ? Which Firebase CLI features do you want to setup for this folder? Press Space to select features, then Enter to confirm your choices. Functions: Con figure and deploy Cloud Functions === Project Setup First, let's associate this project directory with a Firebase project. You can create multiple project aliases by running firebase use --add, but for now we'll just set up a default project. ? Select a default Firebase project for this directory: [don't setup a default project] === Functions Setup A functions directory will be created in your project with a Node.js package pre-configured. Functions can be deployed with firebase deploy. ? What language would you like to use to write Cloud Functions? TypeScript ? Do you want to use TSLint to catch probable bugs and enforce style? Yes ? File functions/package.json already exists. Overwrite? No i Skipping write of functions/package.json ✔ Wrote functions/tslint.json ✔ Wrote functions/tsconfig.json ✔ Wrote functions/src/index.ts ? Do you want to install dependencies with npm now? No i Writing configuration info to firebase.json... i Writing project information to .firebaserc... ✔ Firebase initialization complete!
publicは作られなかった・・。 ので
mkdir public/ mkdir public/assets
をしてから以下のことをした
// あらかじめpublicディレクトリの中をクリーンアップ $ rm -rf public/* // ビルド時に生成された静的ファイルを設置 $ cp -R functions/nuxt/dist/ public/assets // 用意していた静的ファイルを設置 $ cp -R src/static/* public
デプロイの時
firebase serve --only hosting,functions
で
このエラー
Error: No project active. Run with --project <projectId> or define an alias by running firebase use --add
このQiita記事の真似する
ここでプロジェクト作って Sign in - Google Accounts
addする。
そのあとデプロイ
firebase deploy ⚠ functions: package.json indicates an outdated version of firebase-functions. Please upgrade using npm install --save firebase-functions@latest in your functions directory. ⚠ functions: Please note that there will be breaking changes when you upgrade. Go to https://firebase.google.com/docs/functions/beta-v1-diff to learn more. === Deploying to 'nuxttest-eed13'... i deploying functions, hosting i functions: ensuring necessary APIs are enabled... ⚠ functions: missing necessary APIs. Enabling now... ✔ functions: all necessary APIs are enabled i functions: preparing functions directory for uploading... i functions: packaged functions (372.15 KB) for uploading There was an issue deploying your functions. Verify that your project has a Google App Engine instance setup at https://console.cloud.google.com/appengine and try again. If this issue persists, please contact support. ⚠ functions: Upload Error: HTTP Error: 503, The service is currently unavailable.
firebase deploy
で失敗したがもう一度firebase deploy
やったらなんかうまくいった。