test:"增加隔离Docker环境并记录功能验收结果"
This commit is contained in:
1 parent
5d6253cbf1
commit
aee5fe10b4
5 files changed
+200
-1
No files matched your search
@@ -0,0 +1,101 @@
|
||||
# Isolated local acceptance stack. Never imports infra/moyi/.env or business volumes.
|
||||
name: moyi-qa
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15.18
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: moyi_qa
|
||||
POSTGRES_DB: moyi_qa
|
||||
POSTGRES_PASSWORD: ${QA_MOYI_DB_PASSWORD:?Prepare the isolated QA environment file}
|
||||
volumes:
|
||||
- qa_postgres_data:/var/lib/postgresql/data
|
||||
networks: [qa_internal]
|
||||
healthcheck:
|
||||
test: [CMD-SHELL, pg_isready -U moyi_qa -d moyi_qa]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 30
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
REDISCLI_AUTH: ${QA_MOYI_REDIS_PASSWORD:?Prepare the isolated QA environment file}
|
||||
command: [redis-server, --appendonly, 'yes', --requirepass, '${QA_MOYI_REDIS_PASSWORD}', --maxmemory, 64mb, --maxmemory-policy, noeviction]
|
||||
volumes:
|
||||
- qa_redis_data:/data
|
||||
networks: [qa_internal]
|
||||
healthcheck:
|
||||
test: [CMD, redis-cli, ping]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 30
|
||||
|
||||
moyi-api:
|
||||
image: moyi-qa-api:${QA_MOYI_REVISION:?Set the verified source revision}
|
||||
build:
|
||||
context: ../../control-plane-java
|
||||
dockerfile: Dockerfile.runtime
|
||||
labels:
|
||||
org.opencontainers.image.revision: ${QA_MOYI_REVISION}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
CONTROL_PLANE_HOST: 0.0.0.0
|
||||
CONTROL_PLANE_PORT: 8787
|
||||
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/moyi_qa
|
||||
SPRING_DATASOURCE_USERNAME: moyi_qa
|
||||
SPRING_DATASOURCE_PASSWORD: ${QA_MOYI_DB_PASSWORD}
|
||||
MOYI_REDIS_HOST: redis
|
||||
MOYI_REDIS_PORT: 6379
|
||||
MOYI_REDIS_PASSWORD: ${QA_MOYI_REDIS_PASSWORD}
|
||||
MOYI_REDIS_KEY_PREFIX: 'moyi-qa:'
|
||||
ADMIN_ACCOUNT: qa-local-admin
|
||||
ADMIN_DISPLAY_NAME: Local QA Administrator
|
||||
ADMIN_PASSWORD: ${QA_MOYI_ADMIN_PASSWORD:?Prepare the isolated QA environment file}
|
||||
AUTH_PASSWORD_PEPPER: ${QA_MOYI_PASSWORD_PEPPER:?Prepare the isolated QA environment file}
|
||||
CREDENTIAL_ENCRYPTION_KEY: ${QA_MOYI_ENCRYPTION_KEY:?Prepare the isolated QA environment file}
|
||||
CONTROL_PLANE_CORS_ORIGINS: http://127.0.0.1:18089
|
||||
MOYI_FORWARD_HEADERS_STRATEGY: native
|
||||
AUTH_SECURE_COOKIE: 'false'
|
||||
FLYWAY_ENABLED: 'true'
|
||||
JAVA_OPTS: -Xms128m -Xmx512m -XX:+ExitOnOutOfMemoryError
|
||||
networks: [qa_internal]
|
||||
depends_on:
|
||||
postgres: {condition: service_healthy}
|
||||
redis: {condition: service_healthy}
|
||||
healthcheck:
|
||||
test: [CMD-SHELL, 'wget -q -O - http://127.0.0.1:8787/health | grep -q status']
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 30
|
||||
start_period: 20s
|
||||
|
||||
frontend:
|
||||
image: moyi-qa-frontend:${QA_MOYI_REVISION}
|
||||
build:
|
||||
context: ../../prototype
|
||||
dockerfile: Dockerfile.runtime
|
||||
labels:
|
||||
org.opencontainers.image.revision: ${QA_MOYI_REVISION}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '127.0.0.1:18089:80'
|
||||
networks: [qa_internal, qa_edge]
|
||||
depends_on:
|
||||
moyi-api: {condition: service_healthy}
|
||||
healthcheck:
|
||||
test: [CMD-SHELL, 'wget -q -O /dev/null http://127.0.0.1/']
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 15
|
||||
|
||||
networks:
|
||||
qa_internal:
|
||||
internal: true
|
||||
qa_edge:
|
||||
|
||||
volumes:
|
||||
qa_postgres_data:
|
||||
qa_redis_data:
|
||||
Reference in new issue
Block a user