Sign inSign up

alexanderlindner/gitlabci-node-deploy

By alexanderlindner

•Updated about 8 years ago

later

Image
0

10K+

alexanderlindner/gitlabci-node-deploy repository overview

⁠gitlabci-node-deploy

MicroBadger Size Docker Build Status MicroBadger Layers Docker Pulls

This is a simple docker image for automatic build and deployment via ftp of node websites. I use it to automate my website using gitlab and it's ci. It contains node, npm, yarn and lftp.

⁠Example

.gitlab-ci.yml

image: alexanderlindner/gitlabci-node-deploy
stages:
- build

services:

cache:
  paths:
  - node_modules/

build:
  stage: build
  script:
   - yarn
   - yarn run build
   - echo "set ssl:verify-certificate false" > ~/.lftprc
   - >
    cd dist && PASSWORD=$PASSWORD USERNAME=$USERNAME HOST=$HOST lftp -c " \
      set ftp:ssl-allow yes; \
      open -u $USERNAME,$PASSWORD $HOST; \
      mirror -pr static /static --parallel=10 \
      mirror -pr index.html /index.html \
       "
   - echo "finished"
  only:
    - master

The HOST, USERNAME and PASSWORD is provided via Variables tabs in the project setting. The build script is provided by vue⁠

Tag summary

Content type

Image

Digest

Size

25.5 MB

Last updated

about 8 years ago

docker pull alexanderlindner/gitlabci-node-deploy