chore: PRWLR-4055 Update project structure and add env vars (#12)

* chore: PRWLR-4055 update project structure and add env vars

* chore: PRWLR-4055 make production settings default

* chore: PRWLR-4055 change default values to env variables

* chore: PRWLR-4055 apply requested changes on default values

* chore: PRWLR-4055 adapt testing environment
This commit is contained in:
Víctor Fernández Poyatos authored and GitHub committed 2024-07-16 09:33:56 -04:00
1 parent 9df759da60
commit 8f41b38bbf
21 files changed
+162 -94

No files matched your search

+18 -6
View File
@@ -3,8 +3,11 @@ services:
build:
dockerfile: Dockerfile
image: prowler-restful-api
env_file:
- path: ./.env
required: false
ports:
- "8000:8000"
- "${DJANGO_PORT:-8000}:${DJANGO_PORT:-8000}"
profiles:
- prod
depends_on:
@@ -19,8 +22,14 @@ services:
dockerfile: Dockerfile
target: dev
image: prowler-restful-api-dev
environment:
- DJANGO_SETTINGS_MODULE=config.django.devel
- DJANGO_LOGGING_FORMATTER=human_readable
env_file:
- path: ./.env
required: false
ports:
- "8080:8000"
- "${DJANGO_PORT:-8080}:${DJANGO_PORT:-8080}"
volumes:
- "./src/backend:/home/prowler/backend"
- "./pyproject.toml:/home/prowler/pyproject.toml"
@@ -36,14 +45,17 @@ services:
postgres:
image: postgres:16.3-alpine
ports:
- 5432:5432
- "${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}"
hostname: "postgres-db"
volumes:
- ./_data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=S3cret
- POSTGRES_USER=prowler
- POSTGRES_DB=prowler_db
- POSTGRES_USER=${POSTGRES_USER:-prowler}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-S3cret}
- POSTGRES_DB=${POSTGRES_DB:-prowler_db}
env_file:
- path: ./.env
required: false
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U prowler -d prowler_db'"]
interval: 5s