Skip to content

Commit

Permalink
fix(docker): TT-183-change docker compose command (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
safeamiiir authored Oct 9, 2024
2 parents 84fb0f9 + a464306 commit 6111471
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 20 deletions.
2 changes: 1 addition & 1 deletion ci/integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mkdir -p /tmp/aqueduct_experiments && \
mkdir -p /tmp/aqueduct_extensions

echo "Building the stack"
docker-compose -f $PROJECT_ROOT/containers/integration_tests/docker-compose.yml up -d
docker compose -f $PROJECT_ROOT/containers/integration_tests/docker-compose.yml up -d

echo "Installing dependencies"
docker exec --workdir /workspace pyaqueduct-host-dev poetry install
Expand Down
73 changes: 54 additions & 19 deletions containers/integration_tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
x-aqueduct-common: &aqueduct-common
platform: linux/amd64
image: aqueducthub/aqueductcore-dev:latest
restart: always
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_started
environment:
EXPERIMENTS_DIR_PATH: /tmp/aqueduct_experiments
EXTENSIONS_DIR_PATH: /workspace/external/extensions
POSTGRES_USERNAME: admin
POSTGRES_PASSWORD: admin
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: aqueduct
CELERY_MESSAGE_QUEUE: amqp://guest:guest@rabbitmq:5672
volumes:
- /tmp/aqueduct_experiments:/tmp/aqueduct_experiments
- /tmp/aqueduct_extensions:/tmp/aqueduct_extensions

services:
pyaqueduct_host:
build:
Expand All @@ -18,39 +40,52 @@ services:
- ../..:/workspace

aqueductcore:
image: aqueducthub/aqueductcore-dev:latest
container_name: aqueductcore-server
depends_on:
postgres:
condition: service_healthy

environment:
EXPERIMENTS_DIR_PATH: /tmp/aqueduct_experiments
EXTENSIONS_DIR_PATH: /tmp/aqueduct_extensions
POSTGRES_USERNAME: admin
POSTGRES_PASSWORD: admin
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: aqueduct
<<: *aqueduct-common
labels:
- "traefik.enable=true"
- "traefik.http.routers.aqueduct.rule=Host(`aqueduct.localhost`)"
expose:
- 8000

volumes:
- /tmp/aqueduct_experiments:/tmp/aqueduct_experiments
- /tmp/aqueduct_extensions:/tmp/aqueduct_extensions
aqueduct-worker:
<<: *aqueduct-common
labels:
- "traefik.enable=false"
command: aqueduct worker

rabbitmq:
image: rabbitmq:3-management
labels:
- "traefik.enable=true"
- "traefik.http.routers.rabbitmq.rule=Host(`rabbitmq.localhost`)"
- "traefik.http.services.rabbitmq.loadbalancer.server.port=15672"
expose:
- 8000
- 5672
- 15672

postgres:
platform: linux/amd64
image: postgres:15-alpine
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
test: ["CMD-SHELL", "pg_isready -U admin -d aqueduct"]
interval: 5s
timeout: 5s
retries: 5
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=aqueduct
labels:
- "traefik.enable=false"
expose:
- 5432

reverse-proxy:
image: traefik:v3.1
command: --api.insecure=true --providers.docker
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock

1 comment on commit 6111471

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
pyaqueduct
   experiment.py56198%90
pyaqueduct/client
   client.py1463874%52–58, 108–113, 249–257, 326–334, 377–378, 415–416, 430–435, 474–479
   experiment_types.py39197%20
TOTAL3844090% 

Tests Skipped Failures Errors Time
24 0 💤 0 ❌ 0 🔥 1.410s ⏱️

Please sign in to comment.