generated from Sithas/conan_template
37 lines
851 B
YAML
37 lines
851 B
YAML
services:
|
|
up_and_down_service:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
volumes:
|
|
- "//c/CLionProjects/UpAndDown:/project"
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
up_and_down_mysql:
|
|
condition: service_healthy
|
|
|
|
up_and_down_mysql:
|
|
image: mysql:8.4
|
|
command: >
|
|
--mysqlx=ON
|
|
--mysqlx-port=33060
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: root
|
|
ports:
|
|
- "3307:3306"
|
|
- "33061:33060"
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
- "//c/CLionProjects/UpAndDown/db_assets/sql_scripts:/docker-entrypoint-initdb.d:ro"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -p\"$$MYSQL_ROOT_PASSWORD\" --silent" ]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 30
|
|
start_period: 20s
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
mysql_data:
|