Compare commits

..

No commits in common. "8b73888082840d5571ccdc2155ba99a185e896ca" and "d89bd69ee5ee6c497cfa415efdfdfb0a8599afa0" have entirely different histories.

4 changed files with 9 additions and 57 deletions

View File

@ -16,21 +16,7 @@ steps:
when:
branch:
- main
- name: docker-dev
image: plugins/docker
settings:
registry: git.jbranan.com
dry_run: false
username: jblu
password:
from_secret: gittea_drone
repo: git.jbranan.com/jblu/phc
tags:
- dev
when:
branch:
- dev*
- name: test-main
- name: test
image: git.jbranan.com/jblu/phc:latest
environment:
PHC_PLEX_SECRET_TOKEN:
@ -45,8 +31,6 @@ steps:
from_secret: PHC_PLEX_PROTOCOL
PHC_PLEX_PORT:
from_secret: PHC_PLEX_PORT
CRON:
from_secret: CRON
commands:
- echo $PHC_PLEX_SECRET_TOKEN
- echo $PHC_HEALTHCHECK_URL
@ -54,37 +38,4 @@ steps:
- echo $PHC_PLEX_HOST
- echo $PHC_PLEX_PROTOCOL
- echo $PHC_PLEX_PORT
- echo $CRON
- /bin/sh /opt/phc.sh
when:
branch:
- main
- name: test-dev
image: git.jbranan.com/jblu/phc:dev
environment:
PHC_PLEX_SECRET_TOKEN:
from_secret: PHC_PLEX_SECRET_TOKEN
PHC_HEALTHCHECK_URL:
from_secret: PHC_HEALTHCHECK_URL
PHC_HEALTHCHECK_ID:
from_secret: PHC_HEALTHCHECK_ID
PHC_PLEX_HOST:
from_secret: PHC_PLEX_HOST
PHC_PLEX_PROTOCOL:
from_secret: PHC_PLEX_PROTOCOL
PHC_PLEX_PORT:
from_secret: PHC_PLEX_PORT
CRON:
from_secret: CRON
commands:
- echo $PHC_PLEX_SECRET_TOKEN
- echo $PHC_HEALTHCHECK_URL
- echo $PHC_HEALTHCHECK_ID
- echo $PHC_PLEX_HOST
- echo $PHC_PLEX_PROTOCOL
- echo $PHC_PLEX_PORT
- echo $CRON
- /bin/sh /opt/phc.sh
when:
branch:
- dev*

View File

@ -1,7 +1,9 @@
FROM alpine:latest
RUN apk add --no-cache curl supercronic
from alpine:latest
RUN apk add --no-cache curl
COPY crontab opt
COPY entrypoint.sh opt
COPY phc.sh opt
RUN crontab /opt/crontab
RUN chmod +x /opt/entrypoint.sh
RUN chmod +x /opt/phc.sh
CMD ["/opt/entrypoint.sh"]

1
crontab Normal file
View File

@ -0,0 +1 @@
*/30 * * * * . /etc/environment; sh /opt/phc.sh >> /logfile

View File

@ -1,7 +1,5 @@
#!/bin/sh
CRON_CONFIG_FILE="/opt/crontab"
printenv | grep -v "no_proxy" >> /etc/environment
echo "${CRON} sh /opt/phc.sh" > $CRON_CONFIG_FILE
exec supercronic -passthrough-logs -quiet $CRON_CONFIG_FILE
crond -f