Mongo user permissions

This commit is contained in:
Samuel Clay 2025-02-25 17:37:40 -08:00
parent 86a0e10374
commit 8f55e8ee9a
2 changed files with 5 additions and 1 deletions

View file

@ -21,6 +21,9 @@ collectstatic:
bounce:
RUNWITHMAKEBUILD=True CURRENT_UID=${CURRENT_UID} CURRENT_GID=${CURRENT_GID} docker compose down
[[ -d config/certificates ]] && echo "keys exist" || make keys
# Ensure MongoDB data directory exists with proper permissions
mkdir -p docker/volumes/db_mongo
chmod -R 777 docker/volumes/db_mongo || true
RUNWITHMAKEBUILD=True CURRENT_UID=${CURRENT_UID} CURRENT_GID=${CURRENT_GID} docker compose up -d --build --remove-orphans
bootstrap:

View file

@ -153,13 +153,14 @@ services:
db_mongo:
container_name: db_mongo
image: mongo:4.0
user: mongodb
restart: unless-stopped
ports:
- 29019:29019
command: mongod --port 29019
volumes:
- ./docker/volumes/db_mongo:/data/db
# Ensure the MongoDB data directory has proper permissions
user: "${CURRENT_UID}:${CURRENT_GID}"
task_celery:
container_name: task_celery