-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
95 lines (90 loc) · 2.32 KB
/
docker-compose.local.yml
File metadata and controls
95 lines (90 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
services:
server:
build:
context: .
dockerfile: Backgammon.Server/Dockerfile
container_name: backgammon-server-local
restart: unless-stopped
ports:
- "5000:5000"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- AWS_REGION=us-east-1
- DynamoDb__TableName=backgammon-local
- Jwt__Secret=local-test-secret-key-for-development-only-not-secure
- Jwt__Issuer=BackgammonServer
- Jwt__Audience=BackgammonClient
- Jwt__ExpirationDays=7
- DOMAIN=localhost
# For local testing without real DynamoDB, comment out the line below
- AWS_ENDPOINT_URL_DYNAMODB=http://dynamodb-local:8000
networks:
- backgammon-net
depends_on:
- dynamodb-local
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
webclient:
build:
context: .
dockerfile: Backgammon.WebClient/Dockerfile
container_name: backgammon-webclient-local
restart: unless-stopped
ports:
- "3000:3000"
environment:
- ASPNETCORE_ENVIRONMENT=Production
# Service discovery via Docker network
- services__backgammon-api__http__0=http://server:5000
networks:
- backgammon-net
depends_on:
- server
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
caddy:
image: caddy:2-alpine
container_name: backgammon-caddy-local
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
environment:
- DOMAIN=localhost
- TLS_EMAIL=admin@example.com
networks:
- backgammon-net
depends_on:
- server
- webclient
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# DynamoDB Local for testing
dynamodb-local:
image: amazon/dynamodb-local:latest
container_name: backgammon-dynamodb-local
restart: unless-stopped
ports:
- "8000:8000"
command: "-jar DynamoDBLocal.jar -sharedDb -inMemory"
networks:
- backgammon-net
networks:
backgammon-net:
driver: bridge
volumes:
caddy_data:
caddy_config: