docker fix

This commit is contained in:
darius 2024-05-15 16:04:50 +02:00
parent f103aafda8
commit 2e63bcb570
2 changed files with 19 additions and 2 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/api/.env
**.env

View File

@ -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
restart: unless-stopped
depends_on:
database:
condition: service_healthy