Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
data
data
tasks
14 changes: 8 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
version: "3"

services:

cronicle:
image: soulteary/cronicle:0.9.63
build:
context: ./docker
dockerfile: Dockerfile
restart: always
hostname: cronicle
ports:
Expand All @@ -14,16 +15,17 @@ services:
- ./data/data:/opt/cronicle/data
- ./data/logs:/opt/cronicle/logs
- ./data/plugins:/opt/cronicle/plugins
- ./tasks:/opt/cronicle/tasks
extra_hosts:
- "cronicle.lab.io:0.0.0.0"
environment:
- TZ=Asia/Shanghai
- TZ=Europe/Rome
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider localhost:3012/api/app/ping || exit 1"]
interval: 5s
timeout: 1s
retries: 3
logging:
driver: "json-file"
options:
max-size: "10m"
driver: "json-file"
options:
max-size: "10m"
57 changes: 34 additions & 23 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
FROM node:18-bullseye AS Builder
ENV CRONICLE_VERSION=0.9.63
WORKDIR /opt/cronicle
RUN curl -L -o /tmp/Cronicle-${CRONICLE_VERSION}.tar.gz https://github.com/jhuckaby/Cronicle/archive/refs/tags/v${CRONICLE_VERSION}.tar.gz
# COPY Cronicle-${CRONICLE_VERSION}.tar.gz /tmp/
RUN tar zxvf /tmp/Cronicle-${CRONICLE_VERSION}.tar.gz -C /tmp/ && \
mv /tmp/Cronicle-${CRONICLE_VERSION}/* . && \
rm -rf /tmp/* && \
yarn
COPY ./patches /tmp/patches
RUN patch -p3 < /tmp/patches/engine.patch lib/engine.js
COPY docker-entrypoint.js ./bin/
FROM soulteary/cronicle:0.9.63

# Installa le dipendenze necessarie
RUN apk add --no-cache \
icu-libs \
krb5-libs \
libgcc \
libintl \
libssl3 \
libstdc++ \
zlib \
wget \
bash \
ca-certificates \
gcompat

FROM node:18-alpine
RUN apk add procps curl
COPY --from=builder /opt/cronicle/ /opt/cronicle/
WORKDIR /opt/cronicle
ENV CRONICLE_foreground=1
ENV CRONICLE_echo=1
ENV CRONICLE_color=1
ENV debug_level=1
ENV HOSTNAME=main
RUN node bin/build.js dist && bin/control.sh setup
CMD ["node", "bin/docker-entrypoint.js"]
# Installa .NET usando lo script ufficiale
RUN wget https://dot.net/v1/dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --channel 8.0 --runtime aspnetcore --install-dir /usr/share/dotnet && \
ln -sf /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm dotnet-install.sh

# Imposta le variabili d'ambiente per .NET
ENV \
DOTNET_ROOT=/usr/share/dotnet \
PATH="$PATH:/usr/share/dotnet" \
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
ASPNETCORE_URLS=http://+:5000

# Rendi eseguibile dotnet e imposta i permessi
RUN chmod +x /usr/share/dotnet/dotnet && \
chmod +x /usr/local/bin/dotnet

# Verifica l'installazione di .NET
RUN dotnet --info || true