You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
789 B

kind: pipeline
type: docker
name: build-and-run-frontend
trigger:
branch:
include:
- master
event:
include:
- push
- custom
- merge_request
steps:
- name: build frontend image
image: docker
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker build -t alert-front:latest -f scripts/Dockerfile .
- name: run frontend container
image: docker
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker stop alert-front || true
- docker rm alert-front || true
- docker run -d --restart always --name alert-front --network alert-net -p 5000:5000 alert-front:latest
volumes:
- name: dockersock
host:
path: /var/run/docker.sock