Files
prowler/docker-compose.yml
T
Víctor Fernández Poyatos 9df759da60 feat: PRWLR-3989 add PostgreSQL to project (#10)
* feat: PRWLR-3989 add postgresql to project

* chore: PRWLR-3989 add requested changes to docker structure

* chore: PRWLR-3989 update poetry.lock
2024-07-11 10:39:09 -04:00

52 lines
1.1 KiB
YAML

services:
restful-api:
build:
dockerfile: Dockerfile
image: prowler-restful-api
ports:
- "8000:8000"
profiles:
- prod
depends_on:
postgres:
condition: service_healthy
entrypoint:
- "../docker-entrypoint.sh"
- "prod"
restful-api-dev:
build:
dockerfile: Dockerfile
target: dev
image: prowler-restful-api-dev
ports:
- "8080:8000"
volumes:
- "./src/backend:/home/prowler/backend"
- "./pyproject.toml:/home/prowler/pyproject.toml"
profiles:
- dev
depends_on:
postgres:
condition: service_healthy
entrypoint:
- "../docker-entrypoint.sh"
- "dev"
postgres:
image: postgres:16.3-alpine
ports:
- 5432:5432
hostname: "postgres-db"
volumes:
- ./_data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=S3cret
- POSTGRES_USER=prowler
- POSTGRES_DB=prowler_db
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U prowler -d prowler_db'"]
interval: 5s
timeout: 5s
retries: 5