diff --git a/docker-compose.yml b/docker-compose.yml index 6aabbda..0064d57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,8 @@ services: ports: - 80:80 - 443:443 + depends_on: + - api db: @@ -30,9 +32,11 @@ services: ports: # This is only for testing - 3306:3306 + volumes: + - notes-db-volume:/var/lib/mysql healthcheck: test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] - timeout: 20s + timeout: 10s retries: 10 @@ -49,4 +53,7 @@ services: - MYSQL_HOST=db depends_on: db: - condition: service_healthy \ No newline at end of file + condition: service_healthy + +volumes: + notes-db-volume: \ No newline at end of file