Skip to content

Commit

Permalink
refactor: remove unsued volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Dec 29, 2024
1 parent 1fc59eb commit 26a6c72
Showing 1 changed file with 6 additions and 63 deletions.
69 changes: 6 additions & 63 deletions packages/server/src/setup/monitoring-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export const setupMonitoring = async (serverId: string) => {
],
Image: imageName,
HostConfig: {
PidMode: "host",
CapAdd: ["NET_ADMIN", "SYS_ADMIN"],
Privileged: true,
// PidMode: "host",
// CapAdd: ["NET_ADMIN", "SYS_ADMIN"],
// Privileged: true,
PortBindings: {
[`${server.defaultPortMetrics}/tcp`]: [
{
Expand All @@ -28,74 +28,17 @@ export const setupMonitoring = async (serverId: string) => {
],
},
Binds: [
// "/proc:/host/proc",
// "/sys/class/net:/host/sys/class/net:ro",
"/var/run/docker.sock:/var/run/docker.sock:ro",
// "/var/run/docker.sock:/var/run/docker.sock:ro",
"/sys:/host/sys:ro",
"/etc/os-release:/etc/os-release:ro",
// "/sys/devices/system/cpu:/sys/devices/system/cpu:ro",
// "/sys/class/dmi/id:/sys/class/dmi/id:ro",
// "/etc/machine-id:/etc/machine-id:ro",
// "/proc/cpuinfo:/proc/cpuinfo:ro",
// "/proc/cpuinfo:/host/proc/cpuinfo:ro",
],
NetworkMode: "host",
},
ExposedPorts: {
[`${server.defaultPortMetrics}/tcp`]: {},
},

// TaskTemplate: {
// ContainerSpec: {
// Env: [
// `REFRESH_RATE_SERVER=${server.refreshRateMetrics}`,
// `PORT=${server.defaultPortMetrics}`,
// ],
// Mounts: [
// // {
// // Type: "bind",
// // // Source: `${MAIN_TRAEFIK_PATH}/traefik.yml`,
// // Target: "/etc/traefik/traefik.yml",
// // },
// // {
// // Type: "bind",
// // Source: DYNAMIC_TRAEFIK_PATH,
// // Target: "/etc/dokploy/traefik/dynamic",
// // },
// {
// Type: "bind",
// Source: "/proc",
// Target: "/host/proc",
// },
// {
// Type: "bind",
// Source: "/sys/class/net",
// Target: "/host/sys/class/net",
// },
// {
// Type: "bind",
// Source: "/var/run/docker.sock",
// Target: "/var/run/docker.sock",
// },
// ],
// },
// Networks: [{ Target: "dokploy-network" }],
// Placement: {
// Constraints: ["node.role==manager"],
// },
// },
// Mode: {
// Replicated: {
// Replicas: 1,
// },
// },
// EndpointSpec: {
// Ports: [
// {
// TargetPort: server.defaultPortMetrics,
// PublishedPort: server.defaultPortMetrics,
// PublishMode: "host",
// },
// ],
// },
};
const docker = await getRemoteDocker(serverId);
try {
Expand Down

0 comments on commit 26a6c72

Please sign in to comment.