@Kostis I’m still having challenges with shared volume. I’m getting the following error even though I’m following the documentation. The build spec snippet I’m using is below. Please advise.
Error Message:
[SYSTEM]
Message Failed to prepare composition: Run tests
Caused by Cannot start composition with warnings [“Volume mapping is not supported, try use:
/docker-entrypoint-initdb.d/mysql_init.sql”]
Documentation Link Composition · Codefresh | Docs
Pipeline executed successfully
Build Spec
test:
title: "Run tests"
stage: Test
type: composition
fail_fast: true
composition:
version: "3"
services:
# Cache
exos-redis:
image: redis:3.2.8
container_name: "redis"
expose:
- "6379"
healthcheck:
test: ["CMD", "redis-cli", "-h", "localhost", "ping"]
interval: 10s
timeout: 10s
retries: 5
# DB
members-mysql:
image: mysql/mysql-server:8.0.15
env_file: .env
ports:
- 3306
environment:
MYSQL_ROOT_PASSWORD:abc
volumes:
- '${{CF_VOLUME_NAME}}/members/etc/docker/mysql/mysql_init.sql:/docker-entrypoint-initdb.d/mysql_init.sql'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3306"]
interval: 10s
timeout: 10s
retries: 5
command: --default-authentication-plugin=mysql_native_password
composition_candidates:
app:
image: ${{build_members_test_image}}
command: infrastructure/codefresh/test/test.sh
env_file:
- infrastructure/codefresh/test/test.env