Sign inSign up

kawatta/firebase-deploy

By kawatta

•Updated almost 8 years ago

Docker images including the necessary tools to deploy your apps to Firebase

Image
0

219

kawatta/firebase-deploy repository overview

⁠Firebase deploy

Docker images including the necessary tools to deploy your apps to Firebase

⁠Goal

These images were created to help deploying code to Firebase⁠ from a CI/CD environment (e.g. publish a website to Firebase).

⁠Images

⁠alpine

Docker image size This the recommended image if you are only using Firebase hosting⁠, for example to host a static website. This image uses Linux Alpine.

⁠stretch

Docker image size This the recommended image if:

⁠Usage example

⁠Gitlab CI + Firebase hosting:
# Inside .gitlab-ci.yml
# The environment variables FIREBASE_PROJECT and FIREBASE_TOKEN need to be declared in the CI/CD settings of your project

image: kawatta/firebase-deploy:alpine

cache:
  paths:
    - node_modules/ # caching npm modules will allow subsequent builds to run faster, if your project relies on Node 

before_script:
  - npm install # This is only needed if you need Node to build your assets

deploy-to-firebase:
  stage: deploy
  script:
  - npm run build # Building assets
  - firebase use $FIREBASE_PROJECT --token $FIREBASE_TOKEN
  - firebase deploy --only hosting -m "Build $CI_JOB_ID Commit $CI_COMMIT_SHA" --token $FIREBASE_TOKEN
  only:
  - master
⁠Gitlab CI + Firebase hosting and functions:
# Inside .gitlab-ci.yml
# The environment variables FIREBASE_PROJECT and FIREBASE_TOKEN need to be declared in the CI/CD settings of your project

image: kawatta/firebase-deploy:stretch

cache:
  paths:
    - node_modules/
    - functions/node_modules/

before_script:
  - npm install
  - cd functions && npm install && cd ..

deploy-to-firebase:
  stage: deploy
  script:
  - npm run build
  - firebase use $FIREBASE_PROJECT --token $FIREBASE_TOKEN
  - firebase deploy -m "Build $CI_JOB_ID Commit $CI_COMMIT_SHA" --token $FIREBASE_TOKEN
  only:
  - master

Tag summary

Content type

Image

Digest

Size

42.1 MB

Last updated

almost 8 years ago

docker pull kawatta/firebase-deploy:alpine