diff --git a/.gitignore b/.gitignore index 72932e1..dab3c2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/api/.env +**.env diff --git a/docker-compose.yml b/docker-compose.yml index 240c979..5a5a2e3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,25 @@ version: '3.8' services: + database: + image: mysql + restart: always + env_file: + - .env + ports: + - '3306:3306' + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U postgres" ] + interval: 10s + timeout: 5s + retries: 5 + api: build: ./api ports: - "4002:4002" - restart: unless-stopped \ No newline at end of file + restart: unless-stopped + depends_on: + database: + condition: service_healthy +