Merge the agent-impl branch into the server branch

This commit is contained in:
Michael Hohn
2024-06-16 19:21:42 -07:00
committed by =Michael Hohn
26 changed files with 1406 additions and 378 deletions

View File

@@ -1,5 +1,3 @@
version: '3.8'
services:
postgres:
image: postgres:16.3-bookworm
@@ -10,7 +8,7 @@ services:
POSTGRES_DB: exampledb
volumes:
- ./postgres-data:/var/lib/postgresql/data
- ./postgres-init-scripts:/docker-entrypoint-initdb.d
- ./init/postgres:/docker-entrypoint-initdb.d
ports:
- "5432:5432" # Exposing PostgreSQL to the host
expose:
@@ -18,23 +16,31 @@ services:
networks:
- backend
rabbitmq:
image: rabbitmq:3.13-management
image: rabbitmq:3-management
hostname: rabbitmq
container_name: rabbitmq
environment:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: password
volumes:
- ./init/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
- ./init/rabbitmq/definitions.json:/etc/rabbitmq/definitions.json:ro
expose:
- "5672"
- "15672"
ports:
- "5672:5672"
- "15672:15672"
networks:
- backend
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "5672" ]
interval: 5s
timeout: 15s
retries: 1
server:
image: server-image
build:
context: ./cmd/server
dockerfile: Dockerfile
container_name: server
stop_grace_period: 1s # Reduce the timeout period for testing
environment:
@@ -79,16 +85,31 @@ services:
volumes:
- ./qpstore-data:/data
agent:
build:
context: .
dockerfile: ./cmd/agent/Dockerfile
container_name: agent
depends_on:
- rabbitmq
- minio
environment:
MRVA_RABBITMQ_HOST: rabbitmq
MRVA_RABBITMQ_PORT: 5672
MRVA_RABBITMQ_USER: user
MRVA_RABBITMQ_PASSWORD: password
networks:
- backend
networks:
backend:
driver: bridge
# Remove named volumes to use bind mounts
# volumes:
# minio-data:
# postgres_data:
# driver: local
networks:
backend:
driver: bridge