18 lines
651 B
YAML
18 lines
651 B
YAML
kind: pipeline
|
|
type: exec
|
|
name: default
|
|
|
|
steps:
|
|
- name: deploy
|
|
environment:
|
|
HOST:
|
|
from_secret: host
|
|
EMAIL:
|
|
from_secret: email
|
|
CONTAINERNAME: mainpage_new
|
|
commands:
|
|
- docker build ${DRONE_GIT_HTTP_URL} --tag ${DRONE_REPO}
|
|
- docker container stop $CONTAINERNAME
|
|
- docker container rm $CONTAINERNAME_backup
|
|
- docker container rename $CONTAINERNAME $CONTAINERNAME_backup
|
|
- docker run --detach --name mainpage_new --net nginx-proxy --env "VIRTUAL_HOST=$HOST,www.$HOST" --env "VIRTUAL_PORT=3000" --env "LETSENCRYPT_HOST=$HOST,www.$HOST" --env "LETSENCRYPT_EMAIL=$EMAIL" ${DRONE_REPO} |