first update in a while sorry
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Daniel Wolf 2021-04-30 14:59:04 -04:00
parent ec99d6cbbf
commit 3f99dfeda4
Signed by: nephatrine
GPG Key ID: F402AF4822FB01F5
6 changed files with 73 additions and 20 deletions

View File

@ -1,3 +1,5 @@
.drone.yml
.git
.gitignore
LICENSE.md
README.md

53
.drone.yml Normal file
View File

@ -0,0 +1,53 @@
---
kind: pipeline
type: exec
name: default
platform:
os: linux
arch: amd64
steps:
- name: build-0.30
commands:
- docker build --pull -t nephatrine/nginx-h5ai:0.30 .
- HOME=/mnt/config/home docker push nephatrine/nginx-h5ai:0.30
- name: build-latest
commands:
- docker tag nephatrine/nginx-h5ai:0.30 pdr.nephatrine.net/nephatrine/nginx-h5ai:latest
- HOME=/mnt/config/home docker push pdr.nephatrine.net/nephatrine/nginx-h5ai:latest
- docker tag pdr.nephatrine.net/nephatrine/nginx-h5ai:latest nephatrine/nginx-h5ai:latest
- HOME=/mnt/config/home docker push nephatrine/nginx-h5ai:latest
- docker rmi pdr.nephatrine.net/nephatrine/nginx-h5ai:latest
depends_on:
- build-0.30
---
kind: pipeline
name: after
steps:
- name: notify
image: appleboy/drone-discord
settings:
avatar_url: https://nephatrine.net/images/buttons/drone-ci.png
message: "Automated build of **{{repo.name}}:{{commit.branch}}** has returned [{{build.status}}]({{build.link}})."
username: DroneCI
webhook_id:
from_secret: wh-infra-id
webhook_token:
from_secret: wh-infra-tok
depends_on:
- default
trigger:
status:
- success
- failure
---
kind: signature
hmac: 431af154f92e3b2531db94ecbf84441da20cc8413ce7bbef1af8d0bc0f99485e
...

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
fix-perms.sh
test-build.sh

View File

@ -1,29 +1,24 @@
FROM nephatrine/base-php7:latest
FROM nephatrine/nginx-php:latest
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
RUN echo "====== INSTALL PACKAGES ======" \
&& apk --update upgrade \
&& apk add ffmpeg imagemagick zip \
\
&& echo "====== INSTALL BUILD TOOLS ======" \
&& apk add --virtual .build-h5ai nodejs-npm \
\
&& echo "====== COMPILE H5AI ======" \
&& cd /usr/src \
&& git clone https://github.com/lrsjng/h5ai.git \
&& cd h5ai \
&& rm -rf /var/cache/apk/*
ARG H5AI_VERSION=v0.30.0
RUN echo "====== COMPILE H5AI ======" \
&& apk add --virtual .build-h5ai git nodejs-npm \
&& git -C /usr/src clone -b "$H5AI_VERSION" --single-branch --depth=1 https://github.com/lrsjng/h5ai.git && cd /usr/src/h5ai \
&& npm install \
&& npm run build \
&& unzip build/*.zip -d /var/www/html/ \
\
&& echo "====== CONFIGURE SYSTEM ======" \
&& cd /usr/src && rm -rf /usr/src/* \
&& apk del --purge .build-h5ai && rm -rf /var/cache/apk/*
RUN echo "====== CONFIGURE SYSTEM ======" \
&& mkdir -p /mnt/media \
&& sed -i 's~index.html~index.html /_h5ai/public/index.php~g' /etc/nginx/nginx.conf \
&& sed -i 's~/mnt/config/www/~/mnt/config/www/:/mnt/media/~g' /etc/php/php-fpm.d/www.conf \
\
&& echo "====== CLEANUP ======" \
&& cd /usr/src \
&& apk del --purge .build-h5ai \
&& rm -rf /tmp/* /usr/src/* /var/cache/apk/*
&& sed -i 's~/mnt/config/www/~/mnt/config/www/:/mnt/media/~g' /etc/php/php-fpm.d/www.conf
COPY override /

View File

@ -1,4 +1,4 @@
Copyright © 2018 Daniel Wolf <<nephatrine@gmail.com>>
Copyright © 2021 Daniel Wolf <<nephatrine@gmail.com>>
**Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above

View File

@ -1 +1,2 @@
/mnt/media false guardian:users,1000:100 0644 0755
/mnt/media false guardian:users,1000:100 0644 0755
/mnt/media/_h5ai false guardian:users,1000:100 0644 0755