worker/deployments/test/docker-compose.yaml

103 lines
2.3 KiB
YAML

version: '3'
services:
test-postgres:
image: postgres
environment:
POSTGRES_PASSWORD: Redalert2
POSTGRES_USER: squiz
POSTGRES_DB: squiz
volumes:
- tests-postgres:/var/lib/postgresql/data
ports:
- 35432:5432
networks:
- penatest
healthcheck:
test: pg_isready -U squiz
interval: 2s
timeout: 2s
retries: 10
# need update!
# tests-pena-auth-service:
# image: penahub.gitlab.yandexcloud.net:5050/pena-services/pena-auth-service:staging.872
# container_name: tests-pena-auth-service
# init: true
# env_file: auth.env.tests
# healthcheck:
# tests: wget -T1 --spider http://localhost:8000/user
# interval: 2s
# timeout: 2s
# retries: 5
# environment:
# - DB_HOST=tests-pena-auth-db
# - DB_PORT=27017
# - ENVIRONMENT=staging
# - HTTP_HOST=0.0.0.0
# - HTTP_PORT=8000
# - DB_USERNAME=tests
# - DB_PASSWORD=tests
# - DB_NAME=admin
# - DB_AUTH=admin
# # ports:
# # - 8000:8000
# depends_on:
# - tests-pena-auth-db
# # - pena-auth-migration
# networks:
# - penatest
#
# tests-pena-auth-db:
# container_name: tests-pena-auth-db
# init: true
# image: "mongo:6.0.3"
# command: mongod --quiet --logpath /dev/null
# volumes:
# - tests-mongodb:/data/db
# - tests-mongoconfdb:/data/configdb
# environment:
# MONGO_INITDB_ROOT_USERNAME: tests
# MONGO_INITDB_ROOT_PASSWORD: tests
# # ports:
# # - 27017:27017
# networks:
# - penatest
test-minio:
container_name: tests-minio
init: true
image: quay.io/minio/minio
volumes:
- tests-minio:/data
command: [ "minio", "--quiet", "server", "/data" ]
networks:
- penatest
test-squiz:
container_name: tests-squiz
init: true
build:
context: ../..
dockerfile: TestsDockerfile
depends_on:
test-postgres:
condition: service_healthy
# tests-pena-auth-service:
# condition: service_healthy
# volumes:
# - ./../..:/app:ro
# command: [ "go", "tests", "./tests", "-run", "TestFoo" ]
command: [ "go", "tests", "-parallel", "1", "./tests" ]
networks:
- penatest
networks:
penatest:
volumes:
test-minio:
test-postgres:
test-mongodb:
test-mongoconfdb: