forked from cronicle-edge/cronicle-edge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 70424bc
Showing
99 changed files
with
33,715 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/node_modules | ||
/work | ||
/logs | ||
/queue | ||
/data | ||
/conf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.gitignore | ||
/node_modules | ||
/work | ||
/logs | ||
/queue | ||
/data | ||
/conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# build: docker build -t cronicle:test -f Dockerfile --build-arg branch=master --build-arg echo=1 . | ||
|
||
FROM mcr.microsoft.com/powershell:alpine-3.11 | ||
RUN apk add --no-cache nodejs npm git tini util-linux bash neovim openssl krb5 procps coreutils curl acl highlight jq | ||
|
||
# optional java 15 | ||
# RUN apk add openjdk15-jdk --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing | ||
# ENV JAVA_HOME=/usr/lib/jvm/java-15-openjdk | ||
# ENV PATH="$JAVA_HOME/bin:${PATH}" | ||
|
||
# optional mc s3 client (+20MB) | ||
# RUN wget -O /usr/bin/mc http://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x /usr/bin/mc | ||
|
||
# optional - set up custom CA cert | ||
# COPY myCA.cer /usr/local/share/ca-certificates/myCA.crt | ||
# RUN apk add --no-cache ca-certificates | ||
# RUN update-ca-certificates | ||
# ENV NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/myCA.crt | ||
|
||
ENV CRONICLE_foreground=1 | ||
ENV CRONICLE_echo=1 | ||
ENV TZ=America/New_York | ||
ENV EDITOR=nvim | ||
|
||
ENV PATH "/opt/cronicle/bin:${PATH}" | ||
|
||
# non root user for shell plugin | ||
ARG CRONICLE_UID=1007 | ||
ARG CRONICLE_GID=1099 | ||
RUN addgroup cronicle --gid $CRONICLE_GID && adduser -D -h /opt/cronicle -u $CRONICLE_UID -G cronicle cronicle | ||
|
||
# protect sensitive folders | ||
RUN mkdir -p /jars /opt/cronicle/data /opt/cronicle/config && chmod 700 /opt/cronicle/data /opt/cronicle/config | ||
|
||
WORKDIR /opt/cronicle | ||
ARG echo | ||
RUN echo $echo | ||
ARG branch=main | ||
RUN git clone https://github/cronicle-edge/cronicle-edge.git /opt/cronicle | ||
RUN git checkout ${branch} | ||
RUN npm audit fix --force; npm install; node bin/build dist | ||
|
||
ENTRYPOINT ["/sbin/tini", "--"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Docker swarm demo for cronicle cluster | ||
|
||
# sample secret: | ||
# docker secret create cronicle.env /path/to/cronicle.env | ||
|
||
# start cluster: docker stack deploy --compose-file LocalCluster.yaml cron_stack | ||
# check status: docker stack ps cron_stack | ||
# check logs on error: docker service logs cron_stack_manager1 | ||
# remove cluster: docker stack rm cron_stack | ||
|
||
version: '3.8' | ||
services: | ||
worker1: | ||
image: cronicle:latest | ||
hostname: worker1 | ||
ports: | ||
- "3013:3012" | ||
networks: | ||
- cw | ||
deploy: | ||
replicas: 1 | ||
entrypoint: worker | ||
secrets: | ||
- cronicle.env | ||
environment: | ||
- "CRONICLE_secret_key=cronicle_demo" | ||
- "ENV_FILE=/run/secrets/cronicle.env" | ||
|
||
worker2: | ||
image: cronicle:latest | ||
hostname: worker2 | ||
ports: | ||
- "3014:3012" | ||
networks: | ||
- cw | ||
deploy: | ||
replicas: 1 | ||
entrypoint: worker | ||
secrets: | ||
- cronicle.env | ||
environment: | ||
- "CRONICLE_secret_key=cronicle_demo" | ||
- "ENV_FILE=/run/secrets/cronicle.env" | ||
|
||
manager1: | ||
image: cronicle:latest | ||
hostname: manager1 | ||
ports: | ||
- "3012:3012" | ||
networks: | ||
- cw | ||
deploy: | ||
replicas: 1 | ||
entrypoint: manager | ||
secrets: | ||
- cronicle.env | ||
environment: | ||
- "CRONICLE_secret_key=cronicle_demo" | ||
- "ENV_FILE=/run/secrets/cronicle.env" | ||
|
||
networks: | ||
cw: | ||
driver: overlay | ||
attachable: true | ||
|
||
secrets: | ||
cronicle.env: | ||
external: true | ||
|
||
# once manager1 is up and running go to Add Server menu and add worker1 and worker2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# License | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 - 2018 Joseph Huckaby | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.