chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
COPY application/package.json application/package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
# Copy source and build
|
||||
COPY application/. .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.27-alpine
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
# SPA fallback + static asset caching
|
||||
RUN printf 'server {\n listen 80;\n server_name _;\n root /usr/share/nginx/html;\n index index.html;\n location / { try_files $uri $uri/ /index.html; }\n location ~* \\.(?:js|css|png|jpg|jpeg|gif|svg|ico|woff2?)$ { expires 7d; add_header Cache-Control "public, max-age=604800, immutable"; try_files $uri =404; }\n}\n' > /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx","-g","daemon off;"]
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# CheckCle Distributed Regional Monitoring Agent - System metrics collection (HTTP, PING, TCP, DNS)
|
||||
# This Dockerfile for build with this repository: https://github.com/operacle/Distributed-Regional-Monitoring
|
||||
|
||||
FROM golang:1.21-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o service-operation .
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates
|
||||
WORKDIR /root/
|
||||
|
||||
COPY --from=builder /app/service-operation .
|
||||
|
||||
EXPOSE 8091
|
||||
|
||||
CMD ["./service-operation"]
|
||||
@@ -0,0 +1,39 @@
|
||||
version: '3.9'
|
||||
|
||||
services:
|
||||
checkcle:
|
||||
image: operacle/checkcle:latest
|
||||
container_name: checkcle-dev
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8090:8090"
|
||||
volumes:
|
||||
- pb_data:/mnt/pb_data # Persist PocketBase data across rebuilds
|
||||
ulimits:
|
||||
nofile:
|
||||
soft: 4096
|
||||
hard: 8192
|
||||
|
||||
frontend:
|
||||
image: ghcr.io/operacle/checkcle-frontend:sha-b2ae075
|
||||
container_name: checkcle-frontend
|
||||
ports:
|
||||
- "8990:80"
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
depends_on:
|
||||
- checkcle
|
||||
# Fall back to dev server when FRONTEND_IMAGE is not set
|
||||
deploy:
|
||||
replicas: 1
|
||||
# Compose doesn't support conditional configs; document usage:
|
||||
# - To use prebuilt image: export FRONTEND_IMAGE=ghcr.io/<owner>/checkcle-frontend:<tag>
|
||||
# - To use live dev server instead, comment 'image' above and uncomment the block below:
|
||||
# working_dir: /app
|
||||
# command: sh -c "npm ci && npm run dev -- --host 0.0.0.0 --port 8990"
|
||||
# volumes:
|
||||
# - ../application:/app
|
||||
# - /app/node_modules
|
||||
|
||||
volumes:
|
||||
pb_data:
|
||||
@@ -0,0 +1,15 @@
|
||||
version: '3.9'
|
||||
|
||||
services:
|
||||
checkcle:
|
||||
image: operacle/checkcle:latest
|
||||
container_name: checkcle
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8090:8090" # Web Application
|
||||
volumes:
|
||||
- /opt/pb_data:/mnt/pb_data # Host directory mapped to container path
|
||||
ulimits:
|
||||
nofile:
|
||||
soft: 4096
|
||||
hard: 8192
|
||||
@@ -0,0 +1,35 @@
|
||||
name: checkcle-server-agent
|
||||
|
||||
services:
|
||||
checkcle-server-agent:
|
||||
container_name: monitoring-agent
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8081:8081"
|
||||
group_add:
|
||||
- 999
|
||||
environment:
|
||||
AGENT_ID: agent_124343535
|
||||
SERVER_NAME: "test"
|
||||
SERVER_TOKEN: srv_123243434
|
||||
POCKETBASE_URL: http://x.x.x.x:8090
|
||||
POCKETBASE_ENABLED: "true"
|
||||
volumes:
|
||||
- /proc:/host/proc:ro
|
||||
- /etc:/host/etc:ro
|
||||
- /sys:/host/sys:ro
|
||||
- /:/host/root:ro
|
||||
- /var/run:/host/var/run:ro
|
||||
- /dev:/host/dev:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- monitoring_data:/var/lib/monitoring-agent
|
||||
- monitoring_logs:/var/log/monitoring-agent
|
||||
image: operacle/checkcle-server-agent:latest
|
||||
|
||||
volumes:
|
||||
monitoring_data:
|
||||
external: true
|
||||
name: monitoring_data
|
||||
monitoring_logs:
|
||||
external: true
|
||||
name: monitoring_logs
|
||||
Reference in New Issue
Block a user