Compare commits

..

No commits in common. "7a83da1aff86f3b17a9cdd6e77e55c4f5fed5e94" and "dd957c829bc1f297fa8b009c18896bf3c56b462b" have entirely different histories.

4 changed files with 0 additions and 117 deletions

View File

@ -1,2 +0,0 @@
Dockerfile
docker-compose.yml

View File

@ -1,72 +0,0 @@
---
global-variables:
environment: &environment
CRE_PORT: 9103
CRE_RELEASE: ${DRONE_BRANCH##**/}
alpine-image: &alpine-image alpine:latest
docker-registry-repo: &docker-registry-repo registry.fyloz.dev:5443/colorrecipesexplorer/docs
kind: pipeline
name: build
type: docker
steps:
- name: set-docker-tags-latest
image: *alpine-image
commands:
- echo -n "latest" > .tags
when:
branch: master
- name: set-docker-tags-release
image: *alpine-image
environment:
<<: *environment
commands:
- echo -n "latest-release,$CRE_RELEASE" > .tags
when:
branch: release/**
- name: containerize
image: plugins/docker
settings:
repo: *docker-registry-repo
when:
branch:
- master
- release/**
- name: deploy
image: *alpine-image
environment:
<<: *environment
CRE_REGISTRY_IMAGE: *docker-registry-repo
DEPLOY_SERVER:
from_secret: deploy_server
DEPLOY_SERVER_USERNAME:
from_secret: deploy_server_username
DEPLOY_SERVER_SSH_PORT:
from_secret: deploy_server_ssh_port
DEPLOY_SERVER_SSH_KEY:
from_secret: deploy_server_ssh_key
DEPLOY_CONTAINER_NAME: cre_docs
commands:
- apk update
- apk add --no-cache openssh-client
- mkdir -p ~/.ssh
- echo "$DEPLOY_SERVER_SSH_KEY" | tr -d '\r' > ~/.ssh/id_rsa
- chmod 700 ~/.ssh/id_rsa
- eval $(ssh-agent -s)
- ssh-add ~/.ssh/id_rsa
- ssh-keyscan -p $DEPLOY_SERVER_SSH_PORT -H $DEPLOY_SERVER >> ~/.ssh/known_hosts
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh -p $DEPLOY_SERVER_SSH_PORT $DEPLOY_SERVER_USERNAME@$DEPLOY_SERVER "docker stop $DEPLOY_CONTAINER_NAME || true && docker rm $DEPLOY_CONTAINER_NAME || true"
- ssh -p $DEPLOY_SERVER_SSH_PORT $DEPLOY_SERVER_USERNAME@$DEPLOY_SERVER "docker pull $CRE_REGISTRY_IMAGE:$CRE_RELEASE"
- ssh -p $DEPLOY_SERVER_SSH_PORT $DEPLOY_SERVER_USERNAME@$DEPLOY_SERVER "docker run -d -p $CRE_PORT:80 --name=$DEPLOY_CONTAINER_NAME $CRE_REGISTRY_IMAGE:$CRE_RELEASE"
when:
branch: release/**
trigger:
branch:
- master
- release/**

View File

@ -1,26 +0,0 @@
ARG ALPINE_VERSION=3.14
FROM alpine:$ALPINE_VERSION AS build
WORKDIR /usr/src
ARG ALPINE_VERSION
RUN apk update
RUN apk add --no-cache py-pip
RUN pip install mkdocs mkdocs-material
COPY mkdocs.yml .
COPY docs docs
RUN mkdocs build
FROM nginx:mainline-alpine
WORKDIR /usr/bin/
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /usr/src/site/ .
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@ -1,17 +0,0 @@
worker_processes 4;
events {
worker_connections 1024;
}
http {
server {
listen 80;
root /usr/bin;
include /etc/nginx/mime.types;
# location / {
# try_files $uri /index.html =404;
# }
}
}