Compare commits
48 Commits
1.0.2
...
0729a4454b
| Author | SHA1 | Date | |
|---|---|---|---|
| 0729a4454b | |||
| a123d0fecd | |||
| 1286d2053a | |||
| 1a9addf796 | |||
| 4019df3cce | |||
| 0774624fbc | |||
| 8c21c43bfd | |||
| 504aa38362 | |||
| 5fcb0c0e08 | |||
| aace951501 | |||
| 193f104408 | |||
| c4e8faff3b | |||
| 0080d188ab | |||
| eefaba12cb | |||
| 114c87fefe | |||
| a8eb04c76b | |||
| debd509868 | |||
| e8d9f7c8cd | |||
| 98ab91f73f | |||
| 694ba8f5ce | |||
| c232595f36 | |||
| 6ac07ec9a0 | |||
| ab73132553 | |||
| 76cdb2640e | |||
| f1f322d58a | |||
| bfbc0e22d7 | |||
| f3dc829111 | |||
| 9c3caf751e | |||
| 1ac78908ad | |||
| f990871798 | |||
| 2ecac58414 | |||
| 613393f328 | |||
| 30026b4e17 | |||
| 580845afe0 | |||
| d4aa8ff410 | |||
| b3436f3b2c | |||
| 4541df4c8a | |||
| 26c3a15c81 | |||
| e10acf4e46 | |||
| 2d8fb52b23 | |||
| 511704a90f | |||
| 70d6215ca3 | |||
| d759db2bb0 | |||
| c04d6febad | |||
| cad9b48ab9 | |||
| 327208391b | |||
| ee7034cba3 | |||
| 78f681fb41 |
103
.drone.yml
103
.drone.yml
@ -1,12 +1,11 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: build-main-images
|
name: build-release-images
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
@ -19,36 +18,16 @@ steps:
|
|||||||
image: docker:git
|
image: docker:git
|
||||||
commands:
|
commands:
|
||||||
- git fetch --tags
|
- git fetch --tags
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/tags/**
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- clone
|
- clone
|
||||||
|
|
||||||
# Set tags for main branch
|
|
||||||
- name: make-tags
|
- name: make-tags
|
||||||
image: node
|
|
||||||
commands:
|
|
||||||
- echo -n "${DRONE_COMMIT_SHA:0:8}, latest" > .tags
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
depends_on:
|
|
||||||
- get-tags
|
|
||||||
- clone
|
|
||||||
|
|
||||||
- name: make-tags-release
|
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- echo -n "${DRONE_TAG}, latest" > .tags
|
- echo -n "${DRONE_TAG}, latest" > .tags
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/tags/**
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- get-tags
|
- get-tags
|
||||||
- clone
|
|
||||||
|
|
||||||
# Build containers from main branch
|
|
||||||
- name: build-gitea
|
- name: build-gitea
|
||||||
image: thegeeklab/drone-docker-buildx
|
image: thegeeklab/drone-docker-buildx
|
||||||
privileged: true
|
privileged: true
|
||||||
@ -65,7 +44,6 @@ steps:
|
|||||||
- linux/amd64
|
- linux/amd64
|
||||||
depends_on:
|
depends_on:
|
||||||
- make-tags
|
- make-tags
|
||||||
- make-tags-release
|
|
||||||
|
|
||||||
- name: build-github
|
- name: build-github
|
||||||
image: thegeeklab/drone-docker-buildx
|
image: thegeeklab/drone-docker-buildx
|
||||||
@ -83,7 +61,6 @@ steps:
|
|||||||
- linux/amd64
|
- linux/amd64
|
||||||
depends_on:
|
depends_on:
|
||||||
- make-tags
|
- make-tags
|
||||||
- make-tags-release
|
|
||||||
|
|
||||||
- name: release-gitea
|
- name: release-gitea
|
||||||
image: goreleaser/goreleaser
|
image: goreleaser/goreleaser
|
||||||
@ -92,9 +69,6 @@ steps:
|
|||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
commands:
|
commands:
|
||||||
- goreleaser release -f .goreleaser-gitea.yaml
|
- goreleaser release -f .goreleaser-gitea.yaml
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/tags/**
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-gitea
|
- build-gitea
|
||||||
|
|
||||||
@ -105,9 +79,6 @@ steps:
|
|||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
commands:
|
commands:
|
||||||
- goreleaser release -f .goreleaser-github.yaml
|
- goreleaser release -f .goreleaser-github.yaml
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/tags/**
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-github
|
- build-github
|
||||||
|
|
||||||
@ -123,6 +94,78 @@ steps:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- release-gitea
|
- release-gitea
|
||||||
- release-github
|
- release-github
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: build-main-images
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
ref:
|
||||||
|
- refs/heads/main
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: make-tags
|
||||||
|
image: node
|
||||||
|
commands:
|
||||||
|
- echo -n "${DRONE_COMMIT_SHA:0:8}, latest" > .tags
|
||||||
|
when:
|
||||||
|
ref:
|
||||||
|
- refs/heads/main
|
||||||
|
depends_on:
|
||||||
|
- clone
|
||||||
|
|
||||||
|
- name: build-gitea
|
||||||
|
image: thegeeklab/drone-docker-buildx
|
||||||
|
privileged: true
|
||||||
|
settings:
|
||||||
|
provenance: false
|
||||||
|
registry: git.mrmeeb.stream
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: git.mrmeeb.stream/mrmeeb/cronicle
|
||||||
|
platforms:
|
||||||
|
- linux/arm64
|
||||||
|
- linux/amd64
|
||||||
|
depends_on:
|
||||||
|
- make-tags
|
||||||
|
|
||||||
|
- name: build-github
|
||||||
|
image: thegeeklab/drone-docker-buildx
|
||||||
|
privileged: true
|
||||||
|
settings:
|
||||||
|
provenance: false
|
||||||
|
registry: ghcr.io
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: github_token
|
||||||
|
repo: ghcr.io/mrmeeb/cronicle
|
||||||
|
platforms:
|
||||||
|
- linux/arm64
|
||||||
|
- linux/amd64
|
||||||
|
depends_on:
|
||||||
|
- make-tags
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: plugins/slack
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
settings:
|
||||||
|
webhook:
|
||||||
|
from_secret: slack_webhook
|
||||||
|
depends_on:
|
||||||
- build-github
|
- build-github
|
||||||
- build-gitea
|
- build-gitea
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ ENV S6_OVERLAY_ARCH=aarch64
|
|||||||
FROM base-${TARGETARCH}${TARGETVARIANT}
|
FROM base-${TARGETARCH}${TARGETVARIANT}
|
||||||
|
|
||||||
ARG S6_OVERLAY_VERSION=3.1.5.0
|
ARG S6_OVERLAY_VERSION=3.1.5.0
|
||||||
ARG CRONICLE_EDGE_VERSION=1.6.2
|
ARG CRONICLE_EDGE_VERSION=.1.6.3
|
||||||
|
|
||||||
ENV CRONICLE_foreground=1
|
ENV CRONICLE_foreground=1
|
||||||
ENV CRONICLE_echo=1
|
ENV CRONICLE_echo=1
|
||||||
@ -23,7 +23,7 @@ ENV TZ=UTC
|
|||||||
ENV LOG_LEVEL=9
|
ENV LOG_LEVEL=9
|
||||||
|
|
||||||
#Get required packages
|
#Get required packages
|
||||||
RUN apk update && apk add tzdata curl shadow bash xz git procps nodejs npm nano
|
RUN apk update && apk add tzdata curl shadow bash xz git procps nodejs npm nano openssl
|
||||||
|
|
||||||
#Make folders
|
#Make folders
|
||||||
RUN mkdir /config && \
|
RUN mkdir /config && \
|
||||||
@ -57,5 +57,6 @@ RUN chmod +x /cronicle-prepare.sh && \
|
|||||||
chown -R ${PUID}:${PGID} /app /config
|
chown -R ${PUID}:${PGID} /app /config
|
||||||
|
|
||||||
EXPOSE 3012
|
EXPOSE 3012
|
||||||
|
EXPOSE 3013
|
||||||
|
|
||||||
ENTRYPOINT [ "/init" ]
|
ENTRYPOINT [ "/init" ]
|
||||||
29
README.md
29
README.md
@ -92,6 +92,35 @@ services:
|
|||||||
|
|
||||||
This container automatically checks for scripts in `/config/init` and runs them at startup. This could be useful if you need to install additional applications into a worker container so it can execute jobs.
|
This container automatically checks for scripts in `/config/init` and runs them at startup. This could be useful if you need to install additional applications into a worker container so it can execute jobs.
|
||||||
|
|
||||||
|
## Reverse Proxying
|
||||||
|
|
||||||
|
For a single manager behind a reverse proxy, you may need to specify a specific route for the web-socket connections.
|
||||||
|
|
||||||
|
An example using nginx:
|
||||||
|
|
||||||
|
```
|
||||||
|
location /socket.io/ {
|
||||||
|
client_max_body_size 2048m;
|
||||||
|
proxy_read_timeout 86400s;
|
||||||
|
proxy_send_timeout 86400s;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Server $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
proxy_pass http://localhost:3012/socket.io/;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Source: https://github.com/jhuckaby/Cronicle/issues/535
|
||||||
|
|
||||||
|
Load-balancing between multiple managers, as described [here](https://github.com/jhuckaby/Cronicle/blob/master/docs/Setup.md#load-balancers), has not been tested, and could behave strangely due to docker DNS.
|
||||||
|
|
||||||
## Ports
|
## Ports
|
||||||
|
|
||||||
|Port |Description|
|
|Port |Description|
|
||||||
|
|||||||
@ -28,9 +28,11 @@ fi
|
|||||||
|
|
||||||
if [ ! -d /config/cronicle ]
|
if [ ! -d /config/cronicle ]
|
||||||
then
|
then
|
||||||
|
|
||||||
echo "Directory /config/cronicle not found. Creating."
|
echo "Directory /config/cronicle not found. Creating."
|
||||||
|
|
||||||
mkdir /config/cronicle
|
mkdir /config/cronicle
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Detecting what mode Cronicle should be started in
|
#Detecting what mode Cronicle should be started in
|
||||||
@ -48,15 +50,27 @@ then
|
|||||||
cp -r /app/cronicle/conf /config/cronicle/conf
|
cp -r /app/cronicle/conf /config/cronicle/conf
|
||||||
rm -rf /app/cronicle/conf
|
rm -rf /app/cronicle/conf
|
||||||
ln -s /config/cronicle/conf /app/cronicle/conf
|
ln -s /config/cronicle/conf /app/cronicle/conf
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "Config dir already exists. Doesn't need creating."
|
echo "Config dir already exists. Doesn't need creating."
|
||||||
echo "Linking persistent config dir back into Cronicle."
|
echo "Linking persistent config dir back into Cronicle."
|
||||||
|
|
||||||
rm -rf /app/cronicle/conf
|
rm -rf /app/cronicle/conf
|
||||||
ln -s /config/cronicle/conf /app/cronicle/conf
|
ln -s /config/cronicle/conf /app/cronicle/conf
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /config/cronicle/conf/ssl.crt ] || [ ! -f /config/cronicle/conf/ssl.key ]
|
||||||
|
then
|
||||||
|
|
||||||
|
echo "One or both SSL components are missing. Generating."
|
||||||
|
|
||||||
|
rm -f /config/cronicle/conf/ssl.crt /config/cronicle/conf/ssl.key
|
||||||
|
openssl req -x509 -newkey rsa:4096 -keyout /config/cronicle/conf/ssl.key -out /config/cronicle/conf/ssl.crt -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f /config/cronicle/data/.setup_done ]
|
if [ ! -f /config/cronicle/data/.setup_done ]
|
||||||
then
|
then
|
||||||
|
|
||||||
@ -88,6 +102,8 @@ then
|
|||||||
then
|
then
|
||||||
|
|
||||||
echo "No config found. Copy config.json from the manager server and place it in /config/cronicle/conf dir."
|
echo "No config found. Copy config.json from the manager server and place it in /config/cronicle/conf dir."
|
||||||
|
echo "Don't forget to also copy the SSL certs if you're using SSL."
|
||||||
|
|
||||||
mkdir -p /config/cronicle/conf
|
mkdir -p /config/cronicle/conf
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
@ -114,10 +130,12 @@ then
|
|||||||
cp -r /app/cronicle/logs /config/cronicle/logs
|
cp -r /app/cronicle/logs /config/cronicle/logs
|
||||||
rm -rf /app/cronicle/logs
|
rm -rf /app/cronicle/logs
|
||||||
ln -s /config/cronicle/logs /app/cronicle/logs
|
ln -s /config/cronicle/logs /app/cronicle/logs
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "Logs dir already exists. Doesn't need creating."
|
echo "Logs dir already exists. Doesn't need creating."
|
||||||
echo "Linking persistent logs dir back into Cronicle."
|
echo "Linking persistent logs dir back into Cronicle."
|
||||||
|
|
||||||
rm -rf /app/cronicle/logs
|
rm -rf /app/cronicle/logs
|
||||||
ln -s /config/cronicle/logs /app/cronicle/logs
|
ln -s /config/cronicle/logs /app/cronicle/logs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user