fix: docker volume permission error

This commit is contained in:
Daniel Barranquero
2026-02-04 08:27:47 +01:00
parent e1900fc776
commit 90456a7a5e
5 changed files with 13 additions and 11 deletions
+3 -6
View File
@@ -25,7 +25,7 @@ jobs:
e2e-tests:
needs: impact-analysis
if: |
github.repository == 'prowler-cloud/prowler' &&
github.repository == 'prowler-cloud/prowler' &&
(needs.impact-analysis.outputs.has-ui-e2e == 'true' || needs.impact-analysis.outputs.run-all == 'true')
runs-on: ubuntu-latest
env:
@@ -99,9 +99,6 @@ jobs:
yq -i '.networks.kind.external = true' docker-compose.yml
yq -i '.services.worker.networks = ["kind","default"]' docker-compose.yml
- name: Fix API data directory permissions
run: docker run --rm -v $(pwd)/_data/api:/data alpine chown -R 1000:1000 /data
- name: Add AWS credentials for testing
run: |
echo "AWS_ACCESS_KEY_ID=${{ secrets.E2E_AWS_PROVIDER_ACCESS_KEY }}" >> .env
@@ -222,8 +219,8 @@ jobs:
skip-e2e:
needs: impact-analysis
if: |
github.repository == 'prowler-cloud/prowler' &&
needs.impact-analysis.outputs.has-ui-e2e != 'true' &&
github.repository == 'prowler-cloud/prowler' &&
needs.impact-analysis.outputs.has-ui-e2e != 'true' &&
needs.impact-analysis.outputs.run-all != 'true'
runs-on: ubuntu-latest
steps:
-2
View File
@@ -71,8 +71,6 @@ jobs:
yq -i '.networks.kind.external = true' docker-compose.yml
# Add network kind to worker service and default network too
yq -i '.services.worker.networks = ["kind","default"]' docker-compose.yml
- name: Fix API data directory permissions
run: docker run --rm -v $(pwd)/_data/api:/data alpine chown -R 1000:1000 /data
- name: Add AWS credentials for testing AWS SDK Default Adding Provider
run: |
echo "Adding AWS credentials for testing AWS SDK Default Adding Provider..."
+1
View File
@@ -15,6 +15,7 @@ All notable changes to the **Prowler API** are documented in this file.
### 🔄 Changed
- **BREAKING**: Changed API configuration storage from bind mount to Docker named volume to fix permission errors on fresh deployments. Existing JWT keys will be regenerated on upgrade, invalidating active sessions. Users will need to re-authenticate after updating. [(#XXXX)](https://github.com/prowler-cloud/prowler/pull/XXXX)
- Lazy-load providers and compliance data to reduce API/worker startup memory and time [(#9857)](https://github.com/prowler-cloud/prowler/pull/9857)
- Remove unused indexes [(#9904)](https://github.com/prowler-cloud/prowler/pull/9904)
+4 -1
View File
@@ -18,7 +18,7 @@ services:
- ./api/src/backend:/home/prowler/backend
- ./api/pyproject.toml:/home/prowler/pyproject.toml
- ./api/docker-entrypoint.sh:/home/prowler/docker-entrypoint.sh
- ./_data/api:/home/prowler/.config/prowler-api
- api-config:/home/prowler/.config/prowler-api
- outputs:/tmp/prowler_api_output
depends_on:
postgres:
@@ -136,6 +136,7 @@ services:
- ./api/src/backend:/home/prowler/backend
- ./api/pyproject.toml:/home/prowler/pyproject.toml
- ./api/docker-entrypoint.sh:/home/prowler/docker-entrypoint.sh
- api-config:/home/prowler/.config/prowler-api
- outputs:/tmp/prowler_api_output
depends_on:
valkey:
@@ -197,5 +198,7 @@ services:
retries: 3
volumes:
api-config:
driver: local
outputs:
driver: local
+5 -2
View File
@@ -14,7 +14,7 @@ services:
ports:
- "${DJANGO_PORT:-8080}:${DJANGO_PORT:-8080}"
volumes:
- ./_data/api:/home/prowler/.config/prowler-api
- api-config:/home/prowler/.config/prowler-api
- output:/tmp/prowler_api_output
depends_on:
postgres:
@@ -111,7 +111,8 @@ services:
- path: .env
required: false
volumes:
- "output:/tmp/prowler_api_output"
- api-config:/home/prowler/.config/prowler-api
- output:/tmp/prowler_api_output
depends_on:
valkey:
condition: service_healthy
@@ -152,5 +153,7 @@ services:
retries: 3
volumes:
api-config:
driver: local
output:
driver: local