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.
.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
Content type
Image
Digest
Size
25.5 MB
Last updated
about 8 years ago
docker pull alexanderlindner/gitlabci-node-deploy