diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..fb8f88010033c82e8da6d47a1e197e1bef128bff --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +include: + - project: kszk/ci + ref: 0.2.0 + file: + - /template/docker-build.yaml + - /template/ssh-deploy.yaml + +stages: + - build + - docker + - deploy + +compile: + stage: build + tags: [docker] + image: trion/ng-cli + script: + - ng build --prod + artifacts: + expire_in: 1 day + paths: + - dist/ + +dockerhub: + extends: .docker-build-dockerhub + stage: docker + tags: [docker] + only: + - tags + - master + variables: + IMAGE_NAME: rlacko58/kszk-status-angular + IMAGE_TAG: $CI_COMMIT_SHORT_SHA diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e448c3f020941a874f3d0252ac34c790e9aa43c3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:1.19.10 +COPY nginx.conf /etc/nginx/nginx.conf +COPY /dist/kszk-status-angular /usr/share/nginx/html diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..a31729236c063b7cc7a755c5734aa8a175b4aa7f --- /dev/null +++ b/nginx.conf @@ -0,0 +1,13 @@ +events{} +http { + include /etc/nginx/mime.types; + server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + location / { + try_files $uri $uri/ /index.html; + } + } +}