118 lines
3.0 KiB
YAML
118 lines
3.0 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
# rabbitmq:
|
|
# image: rabbitmq:3
|
|
# ports:
|
|
# - 5672:5672
|
|
# - 15672:15672
|
|
|
|
mongo:
|
|
container_name: mongo
|
|
image: mongo
|
|
ports:
|
|
- 27017:27017
|
|
healthcheck:
|
|
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
|
|
|
|
redis:
|
|
image: "redis:alpine"
|
|
command: redis-server --requirepass some_password
|
|
ports:
|
|
- "6379:6379"
|
|
environment:
|
|
- REDIS_REPLICATION_MODE=master
|
|
|
|
minio:
|
|
image: minio/minio
|
|
ports:
|
|
- "9000:9000"
|
|
volumes:
|
|
- ./test/.minio/data:/export
|
|
- ./test/.minio/config:/root/.minio
|
|
environment:
|
|
- MINIO_ROOT_USER=admin
|
|
- MINIO_ROOT_PASSWORD=adminminio
|
|
command: server /export
|
|
healthcheck:
|
|
test: MC_HOST_custom=http://localhost:9000 mc ready local
|
|
|
|
createbucket:
|
|
image: minio/mc
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
entrypoint: >
|
|
/bin/sh -c "
|
|
/usr/bin/mc config host add myminio http://minio:9000 admin adminminio;
|
|
/usr/bin/mc rm -r --force myminio/drive;
|
|
/usr/bin/mc mb myminio/drive;
|
|
exit 0;
|
|
"
|
|
|
|
node:
|
|
image: tdrive/tdrive-node:test
|
|
build:
|
|
context: .
|
|
dockerfile: docker/tdrive-node/Dockerfile
|
|
target: test
|
|
volumes:
|
|
- ./coverage/:/usr/src/app/coverage/
|
|
environment:
|
|
- LOG_LEVEL=error
|
|
- NODE_ENV=test
|
|
# - ACCOUNTS_TYPE=remote
|
|
- SEARCH_DRIVER=mongodb
|
|
- DB_DRIVER=mongodb
|
|
- PUBSUB_TYPE=local
|
|
# - PUBSUB_URLS=amqp://guest:guest@rabbitmq:5672
|
|
- SEARCH_ES_ENDPOINT=http://elasticsearch:9200
|
|
- SEARCH_ES_FLUSHINTERVAL=1
|
|
- STORAGE_DRIVER=S3
|
|
- STORAGE_S3_BUCKET=drive
|
|
- STORAGE_S3_HOME_DIRECTORY=tdrive
|
|
- STORAGE_S3_ENDPOINT=minio
|
|
- STORAGE_S3_ACCESS_KEY=admin
|
|
- STORAGE_S3_SECRET_KEY=adminminio
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
mongo:
|
|
condition: service_healthy
|
|
# rabbitmq:
|
|
# condition: service_started
|
|
elasticsearch:
|
|
condition: service_healthy
|
|
createbucket:
|
|
condition: service_completed_successfully
|
|
links:
|
|
- mongo
|
|
# - rabbitmq
|
|
|
|
elasticsearch:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.4
|
|
environment:
|
|
- xpack.security.enabled=false
|
|
- bootstrap.memory_lock=true
|
|
- discovery.type=single-node
|
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
|
healthcheck:
|
|
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:9200/
|
|
ulimits:
|
|
memlock:
|
|
soft: -1
|
|
hard: -1
|
|
ports:
|
|
- 9200:9200
|
|
|
|
nginx:
|
|
image: tdrive/tdrive-frontend
|
|
ports:
|
|
- 8000:80
|
|
volumes:
|
|
- ./docker-data/logs/nginx/:/var/log/nginx
|
|
- ./docker-data/letsencrypt/:/etc/letsencrypt/
|
|
- ./frontend/:/tdrive-react/
|
|
healthcheck:
|
|
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:80/.well-known/
|