api-testing/e2e/compose.yaml

103 lines
2.6 KiB
YAML

version: '3.1'
services:
testing:
build:
context: ..
dockerfile: e2e/Dockerfile
environment:
GITEE_TOKEN: "$GITEE_TOKEN"
GITHUB_TOKEN: "$GITHUB_TOKEN"
PULL_REQUEST: "$PULL_REQUEST"
depends_on:
etcd:
condition: service_healthy
mysql:
condition: service_healthy
mariadb:
condition: service_healthy
mongo:
condition: service_healthy
postgres:
condition: service_healthy
# minio:
# condition: service_started
volumes:
- type: volume
source: cache
target: /var/data
links:
- etcd
- mysql
- mariadb
- mongo
# - minio
- postgres
etcd:
image: "ghcr.io/linuxsuren/bitnami/etcd:3.5.10"
expose:
- "2379"
environment:
ALLOW_NONE_AUTHENTICATION: "yes"
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/2379"]
interval: 3s
timeout: 60s
retries: 10
start_period: 3s
mysql:
image: ghcr.io/linuxsuren/library/mysql:8.2.0
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: atest
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/3306"]
interval: 3s
timeout: 60s
retries: 10
start_period: 3s
mariadb:
image: ghcr.io/linuxsuren/library/mariadb:11.0
environment:
MARIADB_ROOT_PASSWORD: root
MARIADB_DATABASE: atest
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/3306"]
interval: 3s
timeout: 60s
retries: 10
start_period: 3s
minio:
image: ghcr.io/linuxsuren/bitnami/minio:2023.11.6
environment:
MINIO_ROOT_USER: root
MINIO_ROOT_PASSWORD: root
MINIO_SERVER_HOST: minio
MINIO_DEFAULT_BUCKETS: bucket
mongo:
image: ghcr.io/linuxsuren/library/mongo:7.0.12
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/27017"]
interval: 3s
timeout: 60s
retries: 10
start_period: 3s
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
postgres:
image: ghcr.io/linuxsuren/library/postgres:16.0
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: atest
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/5432"]
interval: 3s
timeout: 30s
retries: 10
start_period: 3s
volumes:
cache: