Commit 9773e8a4 authored by saico's avatar saico 🐙
Browse files

add dockerfile and ci

parent 0944af3b
stages:
- build
variables:
SERVER_NAME: calcguardias.rlab.be
IMAGE_NAME: calcguardias
TAG: latest
before_script:
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\tIdentityFile ~/.ssh/id_rsa\n\n" > ~/.ssh/config
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod -R 700 ~/.ssh
build_image:
stage: build
image: docker:stable
services:
- name: docker:dind
only:
- master
script:
- apk update
- apk upgrade
- apk add python3 python3-dev py-pip build-base libffi-dev libressl-dev libgcc docker-compose git
- apk add --update openssh-client
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -f docker/Dockerfile -t ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${TAG} .
- docker push ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${TAG}
FROM nginx
COPY calc/images /usr/share/nginx/html/images/
COPY calc/index.html /usr/share/nginx/html
COPY calc/styles /usr/share/nginx/html/styles/
COPY calc/scripts /usr/share/nginx/html/scripts/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment