Skip to content

Commit

Permalink
fix compose command
Browse files Browse the repository at this point in the history
  • Loading branch information
XxRoloxX committed Oct 11, 2024
1 parent 074d465 commit b72b3c0
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 79 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-compose-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:

- name: Docker Compose Build
run: |
docker-compose build
docker compose build
env:
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} # Set in your GitHub secrets
GOOGLE_REDIRECT_URI: ${{ secrets.GOOGLE_REDIRECT_URI }} # Set in your GitHub secrets
VITE_BACKEND_URL: ${{ secrets.VITE_BACKEND_URL }} # Set in your GitHub secrets

- name: Docker Compose Push
run: |
docker-compose push
docker compose push
80 changes: 79 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,82 @@ services:
path: ./client/src
target: /app/src
- action: rebuild
path: ./client/package.json
path: ./client/package.json
pod-agent:
user: "0" # Elevated permission needed for bind mount
container_name: magpie-monitor-pod-agent
build:
context: ./agent/app
dockerfile: Dockerfile
restart: always
depends_on:
- kafka
command:
- "--scrape"
- "pods"
- "--scrapeIntervalSeconds"
- "30"
- "--remoteWriteBrokerUrl"
- ${KAFKA_BROKER_URL}
- "--remoteWriteBrokerUsername"
- ${KAFKA_CLIENT_USERNAME}
- "--remoteWriteBrokerPassword"
- ${KAFKA_CLIENT_PASSWORD}
- "--remoteWriteBatchSize"
- ${KAFKA_CLIENT_BATCH_SIZE}
develop:
watch:
- action: rebuild
path: ./agent/app
target: /src
volumes:
- ${POD_AGENT_HOST_KUBECONFIG_PATH}:/root/.kube
node-agent:
user: "0" # Elevated permission needed for bind mount
container_name: magpie-monitor-node-agent
depends_on:
- kafka
- redis
build:
context: ./agent/app
dockerfile: Dockerfile
restart: always
command:
- "--scrape"
- "nodes"
- "--redisUrl"
- "redis:6379"
- "--redisPassword"
- ${REDIS_PASSWORD}
- "--file"
- "/var/log/file"
- "--remoteWriteBrokerUrl"
- ${KAFKA_BROKER_URL}
- "--remoteWriteBrokerUsername"
- ${KAFKA_CLIENT_USERNAME}
- "--remoteWriteBrokerPassword"
- ${KAFKA_CLIENT_PASSWORD}
- "--remoteWriteBatchSize"
- ${KAFKA_CLIENT_BATCH_SIZE}
environment:
NODE_NAME: "mock-node-name"
develop:
watch:
- action: rebuild
path: ./agent/app
target: /src
volumes:
- ${NODE_AGENT_HOST_WATCHED_FILE_PATH}:/var/log/file
redis:
image: redis:7.4-alpine
restart: always
command:
- "--requirepass"
- ${REDIS_PASSWORD}
ports:
- "6379:6379"
volumes:
- redisdata:/data

volumes:
redisdata:
76 changes: 0 additions & 76 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,83 +152,7 @@ services:
ME_CONFIG_MONGODB_ADMINPASSWORD: ${REPORTSDB_PASSWORD}
depends_on:
- mongodb
pod-agent:
user: "0" # Elevated permission needed for bind mount
container_name: magpie-monitor-pod-agent
build:
context: ./agent/app
dockerfile: Dockerfile
restart: always
depends_on:
- kafka
command:
- "--scrape"
- "pods"
- "--scrapeIntervalSeconds"
- "30"
- "--remoteWriteBrokerUrl"
- ${KAFKA_BROKER_URL}
- "--remoteWriteBrokerUsername"
- ${KAFKA_CLIENT_USERNAME}
- "--remoteWriteBrokerPassword"
- ${KAFKA_CLIENT_PASSWORD}
- "--remoteWriteBatchSize"
- ${KAFKA_CLIENT_BATCH_SIZE}
develop:
watch:
- action: rebuild
path: ./agent/app
target: /src
volumes:
- ${POD_AGENT_HOST_KUBECONFIG_PATH}:/root/.kube
node-agent:
user: "0" # Elevated permission needed for bind mount
container_name: magpie-monitor-node-agent
depends_on:
- kafka
- redis
build:
context: ./agent/app
dockerfile: Dockerfile
restart: always
command:
- "--scrape"
- "nodes"
- "--redisUrl"
- "redis:6379"
- "--redisPassword"
- ${REDIS_PASSWORD}
- "--file"
- "/var/log/file"
- "--remoteWriteBrokerUrl"
- ${KAFKA_BROKER_URL}
- "--remoteWriteBrokerUsername"
- ${KAFKA_CLIENT_USERNAME}
- "--remoteWriteBrokerPassword"
- ${KAFKA_CLIENT_PASSWORD}
- "--remoteWriteBatchSize"
- ${KAFKA_CLIENT_BATCH_SIZE}
environment:
NODE_NAME: "mock-node-name"
develop:
watch:
- action: rebuild
path: ./agent/app
target: /src
volumes:
- ${NODE_AGENT_HOST_WATCHED_FILE_PATH}:/var/log/file
# Please ignore warning about vm.overcommit_memory, it requires host changes that aren't justified in a dev environment.
redis:
image: redis:7.4-alpine
restart: always
command:
- "--requirepass"
- ${REDIS_PASSWORD}
ports:
- "6379:6379"
volumes:
- redisdata:/data

management-service:
container_name: magpie-monitor-management-service
image: magpiemonitor/management-service
Expand Down

0 comments on commit b72b3c0

Please sign in to comment.