its kind of working now
This commit is contained in:
58
docker-compose.yml
Normal file
58
docker-compose.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
services:
|
||||
dev:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: dynamodb-zig-dev
|
||||
volumes:
|
||||
- .:/workspace
|
||||
- zig-cache:/root/.cache/zig
|
||||
ports:
|
||||
- "8000:8000" # DynamoDB API port
|
||||
- "8080:8080" # Admin/metrics port (optional)
|
||||
working_dir: /workspace
|
||||
stdin_open: true
|
||||
tty: true
|
||||
command: /bin/bash
|
||||
|
||||
# Optional: Run the actual server
|
||||
server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: dynamodb-zig-server
|
||||
volumes:
|
||||
- .:/workspace
|
||||
- zig-cache:/root/.cache/zig
|
||||
- db-data:/workspace/data
|
||||
ports:
|
||||
- "8000:8000"
|
||||
working_dir: /workspace
|
||||
command: zig build run
|
||||
|
||||
# Optional: DynamoDB Local for compatibility testing
|
||||
dynamodb-local:
|
||||
image: amazon/dynamodb-local:latest
|
||||
container_name: dynamodb-local
|
||||
ports:
|
||||
- "8001:8000"
|
||||
command: "-jar DynamoDBLocal.jar -sharedDb -inMemory"
|
||||
|
||||
# DynamoDB Admin GUI
|
||||
dynamodb-admin:
|
||||
image: aaronshaf/dynamodb-admin:latest
|
||||
container_name: dynamodb-admin
|
||||
ports:
|
||||
- "8002:8001" # Admin GUI will be available at localhost:8002
|
||||
environment:
|
||||
- DYNAMO_ENDPOINT=http://server:8000 # Points to your Zig server
|
||||
# Alternative: Use http://dynamodb-local:8000 to connect to AWS's DynamoDB Local
|
||||
- AWS_REGION=us-east-1
|
||||
- AWS_ACCESS_KEY_ID=local
|
||||
- AWS_SECRET_ACCESS_KEY=local
|
||||
depends_on:
|
||||
- server
|
||||
|
||||
volumes:
|
||||
zig-cache:
|
||||
db-data:
|
||||
Reference in New Issue
Block a user