image: node:latest
services:
# This folder is cached between builds
stages:
- deploy
cache:
paths:
- node_modules/
deploy_staging:
stage: deploy
script:
- echo "Deploy to staging server"
- npm install
- npm install pm2 -g
- pm2 start bin/www --name mms
- ps -ef | grep mms
environment:
name: staging
url: http://staging.example.com
I have deployed a nodeJS application on the server, how can I access the endpoints of the app using this URL?
You seem to be confusing what the environment can and can not do. The url variable is just for your convenience :
This is an optional value that when set, it exposes buttons in various places in GitLab which when clicked take you to the defined URL.
Gitlab doesn't create an endpoint under the URL, you supply the URL under which the application is reachable after the deploy.
Link to answer which solves all queries
This is most accurate answer to solve all gitlab CI queries
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.