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.
38 lines
769 B
38 lines
769 B
2 months ago
|
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 -p 8080:8080 alert-front:latest
|
||
|
|
||
|
volumes:
|
||
|
- name: dockersock
|
||
|
host:
|
||
|
path: /var/run/docker.sock
|