'Hi every one, i got this issue with docker-compose up: it's giving me this Can't find a suitable configuration file in this directory or any
version: '3.8' services: backend: image: antoniopapa1991/backend environment: DB_HOST: db DB_DATABASE: admin DB_USERNAME: root DB_PASSWORD: root ports: - 8000:8000 depends_on: - db
db: image: mysql:5.7.22 restart: always environment: MYSQL_DATABASE: admin MYSQL_USER: root MYSQL_PASSWORD: root MYSQL_ROOT_PASSWORD: root volumes:
- .dbdata:/var/lib/mysql
Solution 1:[1]
It could be that there's just some wrong indentation in your docker-compose.yml file, what would lead to some wrong configuration. Is your docker-compose (including indentation) like this? Or is it somehow different?
version: '3.8'
services:
backend:
image: antoniopapa1991/backend
environment:
DB_HOST: db
DB_DATABASE: admin
DB_USERNAME: root
DB_PASSWORD: root
ports:
- 8000:8000
depends_on:
- db
db:
image: mysql:5.7.22
restart: always
environment:
MYSQL_DATABASE: admin
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
volumes:
- .dbdata:/var/lib/mysql
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Marcos Parreiras |
