Docker compose

This commit is contained in:
Eden Kirin
2024-01-13 20:17:27 +01:00
parent 59252abafb
commit d698a6a0aa
4 changed files with 78 additions and 0 deletions

30
docker-compose.yml Normal file
View File

@ -0,0 +1,30 @@
services:
db:
build:
context: ./database
dockerfile: Dockerfile
ports:
- 55432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 5s
retries: 10
machines-app:
build:
context: ./machines
dockerfile: Dockerfile
environment:
- DBHOST=db
- DBPORT=5432
- DBNAME=komponiranje
- DBUSER=pero
- DBPASSWORD=pero.000
ports:
- 3000:3000
depends_on:
db:
condition: service_healthy