archetecture security fix
This commit is contained in:
+24
-18
@@ -1,21 +1,27 @@
|
||||
services:
|
||||
test-db:
|
||||
image: mysql:8.0
|
||||
container_name: alrahma_test_db
|
||||
command:
|
||||
- --default-authentication-plugin=mysql_native_password
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
MYSQL_DATABASE: ${TEST_DB_DATABASE:-school_api_test}
|
||||
MYSQL_USER: ${TEST_DB_USERNAME:-school}
|
||||
MYSQL_PASSWORD: ${TEST_DB_PASSWORD:-school}
|
||||
MYSQL_ROOT_PASSWORD: ${TEST_DB_ROOT_PASSWORD:-root}
|
||||
ports:
|
||||
- "${TEST_DB_PORT:-33106}:3306"
|
||||
# Store data in RAM so the test database is fast and ephemeral.
|
||||
tmpfs:
|
||||
- /var/lib/mysql
|
||||
POSTGRES_DB: rentaldrivego_test
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-p${TEST_DB_ROOT_PASSWORD:-root}"]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 30
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d rentaldrivego_test"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
|
||||
test:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.test
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
env_file:
|
||||
- .env.docker.test
|
||||
|
||||
Reference in New Issue
Block a user