Merge pull request 'dev-migrate-supercronic' (#1) from dev-migrate-supercronic into main
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.jbranan.com/jblu/phc/pulls/1
This commit is contained in:
commit
8b73888082
53
.drone.yml
53
.drone.yml
@ -16,7 +16,21 @@ steps:
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
- name: test
|
||||
- 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
|
||||
image: git.jbranan.com/jblu/phc:latest
|
||||
environment:
|
||||
PHC_PLEX_SECRET_TOKEN:
|
||||
@ -31,6 +45,8 @@ 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
|
||||
@ -38,4 +54,37 @@ steps:
|
||||
- echo $PHC_PLEX_HOST
|
||||
- echo $PHC_PLEX_PROTOCOL
|
||||
- echo $PHC_PLEX_PORT
|
||||
- /bin/sh /opt/phc.sh
|
||||
- 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*
|
@ -1,9 +1,7 @@
|
||||
from alpine:latest
|
||||
RUN apk add --no-cache curl
|
||||
COPY crontab opt
|
||||
FROM alpine:latest
|
||||
RUN apk add --no-cache curl supercronic
|
||||
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,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
printenv | grep -v "no_proxy" >> /etc/environment
|
||||
CRON_CONFIG_FILE="/opt/crontab"
|
||||
|
||||
crond -f
|
||||
echo "${CRON} sh /opt/phc.sh" > $CRON_CONFIG_FILE
|
||||
|
||||
exec supercronic -passthrough-logs -quiet $CRON_CONFIG_FILE
|
Loading…
x
Reference in New Issue
Block a user