Add cgi scripts
continuous-integration/drone/push Build is passing Details

This commit is contained in:
nemunaire 2022-02-08 12:17:13 +01:00
parent 5fd50d69f1
commit e05d3ebe59
3 changed files with 102 additions and 11 deletions

22
.drone-manifest-fcgi.yml Normal file
View File

@ -0,0 +1,22 @@
image: nemunaire/nagios-fcgi:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: nemunaire/nagios-fcgi:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
- image: nemunaire/nagios-fcgi:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
architecture: arm64
os: linux
variant: v8
- image: nemunaire/nagios-fcgi:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
architecture: arm
os: linux
variant: v7

View File

@ -8,17 +8,32 @@ platform:
arch: amd64
steps:
- name: docker build and publish
# - name: docker build and publish
# image: plugins/docker
# settings:
# username:
# from_secret: docker_username
# password:
# from_secret: docker_password
# repo: nemunaire/nagios
# auto_tag: true
# auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
# dockerfile: Dockerfile
# when:
# branch:
# - master
- name: build fcgi image
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: nemunaire/nagios
repo: nemunaire/nagios-fcgi
auto_tag: true
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
dockerfile: Dockerfile
dockerfile: Dockerfile.fcgi
when:
branch:
- master
@ -39,17 +54,32 @@ platform:
arch: arm64
steps:
- name: docker build and publish
# - name: docker build and publish
# image: plugins/docker
# settings:
# username:
# from_secret: docker_username
# password:
# from_secret: docker_password
# repo: nemunaire/nagios
# auto_tag: true
# auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
# dockerfile: Dockerfile
# when:
# branch:
# - master
- name: build fcgi image
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: nemunaire/nagios
repo: nemunaire/nagios-fcgi
auto_tag: true
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
dockerfile: Dockerfile
dockerfile: Dockerfile.fcgi
when:
branch:
- master
@ -70,17 +100,32 @@ platform:
arch: arm
steps:
- name: docker build and publish
# - name: docker build and publish (nagios)
# image: plugins/docker
# settings:
# username:
# from_secret: docker_username
# password:
# from_secret: docker_password
# repo: nemunaire/nagios
# auto_tag: true
# auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
# dockerfile: Dockerfile
# when:
# branch:
# - master
- name: build fcgi image
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: nemunaire/nagios
repo: nemunaire/nagios-fcgi
auto_tag: true
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
dockerfile: Dockerfile
dockerfile: Dockerfile.fcgi
when:
branch:
- master
@ -95,12 +140,23 @@ trigger:
kind: pipeline
name: docker-manifest
steps:
- name: publish manifest
# - name: publish manifest
# image: plugins/manifest
# settings:
# auto_tag: true
# ignore_missing: true
# spec: .drone-manifest.yml
# username:
# from_secret: docker_username
# password:
# from_secret: docker_password
- name: publish fcgi manifest
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
spec: .drone-manifest.yml
spec: .drone-manifest-fcgi.yml
username:
from_secret: docker_username
password:

13
Dockerfile.fcgi Normal file
View File

@ -0,0 +1,13 @@
FROM alpine
RUN adduser -S -s /sbin/nologin -h /var/www/localhost/htdocs -u 80 -G www-data www-data && \
apk add --no-cache \
fcgiwrap \
nagios \
nagios-web \
&& \
addgroup www-data nagios
EXPOSE 8080
USER www-data
CMD ["/usr/bin/fcgiwrap", "-s", "tcp:0.0.0.0:8080"]