Add docker and compose

This commit is contained in:
2024-05-03 22:40:45 +02:00
parent 7f6fe3e350
commit 5ab9d9d0e0
6 changed files with 79 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
services:
api:
build:
context: ./api
dockerfile: Dockerfile.dev
restart: on-failure
volumes:
- ./api:/app
env_file:
- ./.env
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:15
restart: on-failure
env_file:
- ./.env
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
volumes:
db: