Commit 374ecac5 authored by Jørn Åne de Jong's avatar Jørn Åne de Jong

Initial build

parents
Pipeline #2861 passed with stages
in 4 minutes and 41 seconds
image: registry.uninett.no/system/kubernetes-deploy:v0.8
variables:
HTTP_PORT: '80' # The port number of the web server.
REPLICAS: '2'
stages:
- build
- staging
- production
build:
variables:
GIT_SUBMODULE_STRATEGY: recursive
stage: build
script:
- build
only:
- branches
production:
stage: production
variables:
CI_ENVIRONMENT_URL: $KUBE_PROD_URL
script:
- deploy kubernetes.yaml
environment:
name: production
url: $KUBE_PROD_URL
when: manual
only:
- master
staging:
stage: staging
variables:
CI_ENVIRONMENT_URL: $KUBE_STAGING_URL
REPLICAS: '1'
script:
- deploy kubernetes.yaml
environment:
name: staging
url: $KUBE_STAGING_URL
only:
- master
[submodule "wifiprobe-docs"]
path = wifiprobe-docs
url = https://github.com/UNINETT/wifiprobe-docs.git
FROM centos:7
RUN yum install epel-release -y
RUN yum update -y
RUN yum install lighttpd npm -y
RUN npm install gitbook-cli -g
COPY wifiprobe-docs /var/www/wifiprobe-docs
WORKDIR /var/www/wifiprobe-docs
RUN gitbook build
COPY lighttpd.conf /var/www/wifiprobe-docs.lighttpd.conf
ENTRYPOINT ["/usr/sbin/lighttpd", "-D", "-f", "/var/www/wifiprobe-docs.lighttpd.conf"]
eduroam-configurator:
git submodule init
git submodule update
docker: eduroam-configurator
docker rm -f wifiprobe-docs || true
docker build -t wifiprobe-docs .
docker-run: docker
docker rm -f wifiprobe-docs || true
docker run -d -p 8000:80 --name wifiprobe-docs wifiprobe-docs
sleep 1
docker logs wifiprobe-docs
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: $CI_ENVIRONMENT_SLUG
namespace: $KUBE_NAMESPACE
labels:
app: $CI_ENVIRONMENT_SLUG
pipeline_id: "$CI_PIPELINE_ID"
build_id: "$CI_BUILD_ID"
spec:
replicas: $REPLICAS
template:
metadata:
labels:
name: $CI_ENVIRONMENT_SLUG
app: $CI_ENVIRONMENT_SLUG
spec:
containers:
- name: app
image: $CI_REGISTRY_IMAGE:$CI_REGISTRY_TAG
imagePullPolicy: Always
resources:
limits:
memory: 500Mi
requests:
memory: 300Mi
ports:
- name: web
containerPort: $HTTP_PORT
livenessProbe:
httpGet:
path: /
port: $HTTP_PORT
initialDelaySeconds: 15
timeoutSeconds: 15
readinessProbe:
httpGet:
path: /
port: $HTTP_PORT
initialDelaySeconds: 5
timeoutSeconds: 15
server.document-root = "/var/www/wifiprobe-docs/_book"
server.port = 80
server.username = "lighttpd"
server.groupname = "lighttpd"
include "/etc/lighttpd/conf.d/mime.conf"
index-file.names = ( "index.html" )
Subproject commit 39302fc4b4ac584b8103f127f16d435b00afaa7e
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