Skip to content

Commit 174e7b9

Browse files
committed
Fix issues with volume & permissions
1 parent d45b188 commit 174e7b9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docker-compose.dynamodb.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1+
#ddev-generated
12
version: '3.6'
23
services:
34
dynamodb:
45
container_name: "ddev-${DDEV_SITENAME}-dynamodb"
56
hostname: ${DDEV_SITENAME}-dynamodb
67
image: amazon/dynamodb-local:latest
8+
# When mounting a volume and using -dbPath DynamoDb is crashing. Run as root.
9+
# @see https://stackoverflow.com/questions/45850688/unable-to-open-local-dynamodb-database-file-after-power-outage
10+
user: root
711
ports:
812
- "8000:8000"
9-
command: [ "-jar", "DynamoDBLocal.jar", "-sharedDb" ]
13+
command: "-jar DynamoDBLocal.jar -dbPath ./databases"
1014
labels:
1115
com.ddev.site-name: ${DDEV_SITENAME}
1216
com.ddev.approot: $DDEV_APPROOT
1317
volumes:
14-
- dynamodb:/var/dynamodb
18+
- "dynamodb:/home/dynamodblocal/databases"
1519
- ".:/mnt/ddev_config"
20+
working_dir: /home/dynamodblocal
1621

1722
volumes:
1823
dynamodb:

0 commit comments

Comments
 (0)