💚 add healthchecks to the docker compose services used in CI testing, removed scylladb, add env vars that are always set, removed unused dependencies
This commit is contained in:
@@ -62,7 +62,7 @@ jobs:
|
|||||||
- name: e2e-mongo-s3-test
|
- name: e2e-mongo-s3-test
|
||||||
run: |
|
run: |
|
||||||
cd tdrive
|
cd tdrive
|
||||||
docker compose -f docker-compose.tests.yml run --rm -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=mongodb -e DB_DRIVER=mongodb -e PUBSUB_TYPE=local node npm run test:all
|
docker compose -f docker-compose.tests.yml run --rm -e NODE_OPTIONS=--unhandled-rejections=warn node npm run test:all
|
||||||
docker compose -f docker-compose.tests.yml down
|
docker compose -f docker-compose.tests.yml down
|
||||||
- name: e2e-opensearch-test
|
- name: e2e-opensearch-test
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,22 +1,20 @@
|
|||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
scylladb:
|
# rabbitmq:
|
||||||
image: scylladb/scylla:4.1.0
|
# image: rabbitmq:3
|
||||||
command: --seeds=scylladb --smp 1 --memory 400M --overprovisioned 1 --api-address 0.0.0.0
|
# ports:
|
||||||
scylladb2:
|
# - 5672:5672
|
||||||
image: scylladb/scylla:4.1.0
|
# - 15672:15672
|
||||||
command: --seeds=scylladb --smp 1 --memory 400M --overprovisioned 1 --api-address 0.0.0.0
|
|
||||||
rabbitmq:
|
|
||||||
image: rabbitmq:3
|
|
||||||
ports:
|
|
||||||
- 5672:5672
|
|
||||||
- 15672:15672
|
|
||||||
mongo:
|
mongo:
|
||||||
container_name: mongo
|
container_name: mongo
|
||||||
image: mongo
|
image: mongo
|
||||||
ports:
|
ports:
|
||||||
- 27017:27017
|
- 27017:27017
|
||||||
|
healthcheck:
|
||||||
|
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: "redis:alpine"
|
image: "redis:alpine"
|
||||||
command: redis-server --requirepass some_password
|
command: redis-server --requirepass some_password
|
||||||
@@ -24,6 +22,7 @@ services:
|
|||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
environment:
|
environment:
|
||||||
- REDIS_REPLICATION_MODE=master
|
- REDIS_REPLICATION_MODE=master
|
||||||
|
|
||||||
minio:
|
minio:
|
||||||
image: minio/minio
|
image: minio/minio
|
||||||
ports:
|
ports:
|
||||||
@@ -35,11 +34,14 @@ services:
|
|||||||
- MINIO_ROOT_USER=admin
|
- MINIO_ROOT_USER=admin
|
||||||
- MINIO_ROOT_PASSWORD=adminminio
|
- MINIO_ROOT_PASSWORD=adminminio
|
||||||
command: server /export
|
command: server /export
|
||||||
|
healthcheck:
|
||||||
|
test: MC_HOST_custom=http://localhost:9000 mc ready local
|
||||||
|
|
||||||
createbucket:
|
createbucket:
|
||||||
image: minio/mc
|
image: minio/mc
|
||||||
depends_on:
|
depends_on:
|
||||||
- minio
|
minio:
|
||||||
|
condition: service_healthy
|
||||||
entrypoint: >
|
entrypoint: >
|
||||||
/bin/sh -c "
|
/bin/sh -c "
|
||||||
/usr/bin/mc config host add myminio http://minio:9000 admin adminminio;
|
/usr/bin/mc config host add myminio http://minio:9000 admin adminminio;
|
||||||
@@ -47,6 +49,7 @@ services:
|
|||||||
/usr/bin/mc mb myminio/drive;
|
/usr/bin/mc mb myminio/drive;
|
||||||
exit 0;
|
exit 0;
|
||||||
"
|
"
|
||||||
|
|
||||||
node:
|
node:
|
||||||
image: tdrive/tdrive-node:test
|
image: tdrive/tdrive-node:test
|
||||||
build:
|
build:
|
||||||
@@ -58,8 +61,11 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- LOG_LEVEL=error
|
- LOG_LEVEL=error
|
||||||
- NODE_ENV=test
|
- NODE_ENV=test
|
||||||
- DB_DRIVER
|
# - ACCOUNTS_TYPE=remote
|
||||||
- PUBSUB_URLS=amqp://guest:guest@rabbitmq:5672
|
- SEARCH_DRIVER=mongodb
|
||||||
|
- DB_DRIVER=mongodb
|
||||||
|
- PUBSUB_TYPE=local
|
||||||
|
# - PUBSUB_URLS=amqp://guest:guest@rabbitmq:5672
|
||||||
- SEARCH_ES_ENDPOINT=http://elasticsearch:9200
|
- SEARCH_ES_ENDPOINT=http://elasticsearch:9200
|
||||||
- SEARCH_ES_FLUSHINTERVAL=1
|
- SEARCH_ES_FLUSHINTERVAL=1
|
||||||
- STORAGE_DRIVER=S3
|
- STORAGE_DRIVER=S3
|
||||||
@@ -69,15 +75,19 @@ services:
|
|||||||
- STORAGE_S3_ACCESS_KEY=admin
|
- STORAGE_S3_ACCESS_KEY=admin
|
||||||
- STORAGE_S3_SECRET_KEY=adminminio
|
- STORAGE_S3_SECRET_KEY=adminminio
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
minio:
|
||||||
- scylladb
|
condition: service_healthy
|
||||||
- rabbitmq
|
mongo:
|
||||||
- elasticsearch
|
condition: service_healthy
|
||||||
- createbucket
|
# rabbitmq:
|
||||||
|
# condition: service_started
|
||||||
|
elasticsearch:
|
||||||
|
condition: service_healthy
|
||||||
|
createbucket:
|
||||||
|
condition: service_completed_successfully
|
||||||
links:
|
links:
|
||||||
- mongo
|
- mongo
|
||||||
- scylladb
|
# - rabbitmq
|
||||||
- rabbitmq
|
|
||||||
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.4
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.4
|
||||||
@@ -86,6 +96,8 @@ services:
|
|||||||
- bootstrap.memory_lock=true
|
- bootstrap.memory_lock=true
|
||||||
- discovery.type=single-node
|
- discovery.type=single-node
|
||||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||||
|
healthcheck:
|
||||||
|
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:9200/
|
||||||
ulimits:
|
ulimits:
|
||||||
memlock:
|
memlock:
|
||||||
soft: -1
|
soft: -1
|
||||||
@@ -100,4 +112,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./docker-data/logs/nginx/:/var/log/nginx
|
- ./docker-data/logs/nginx/:/var/log/nginx
|
||||||
- ./docker-data/letsencrypt/:/etc/letsencrypt/
|
- ./docker-data/letsencrypt/:/etc/letsencrypt/
|
||||||
- ./frontend/:/tdrive-react/
|
- ./frontend/:/tdrive-react/
|
||||||
|
healthcheck:
|
||||||
|
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:80/.well-known/
|
||||||
|
|||||||
Reference in New Issue
Block a user