forked from sandhaka/MyMicroservicesApplication
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
69 lines (69 loc) · 2.38 KB
/
docker-compose.dev.yml
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
version: '3.2'
services:
auth:
build: ./Services/AuthService
image: sandhaka/mymicsapp_auth
command: dotnet run --rm
ports:
- "5000:443"
environment:
CONNECTION_STRING: "Server=mysql.data; Port=3306; Database=mymicsapp.Services.identityDb; Uid=sandhaka; Password=pwd"
ASPNETCORE_ENVIRONMENT: "Development"
depends_on:
- mysql.data
orders:
build: ./Services/Orders/Orders.Application
image: "sandhaka/mymicsapp_orders"
command: dotnet run --rm
ports:
- "9000:443"
environment:
CONNECTION_STRING: "Server=mysql.data; Port=3306; Database=mymicsapp.Services.ordersDb; Uid=sandhaka; Password=pwd"
ASPNETCORE_ENVIRONMENT: "Development"
depends_on:
- mysql.data
catalog:
build: ./Services/Catalog/Catalog.Application
image: "sandhaka/mymicsapp_catalog"
command: dotnet run --rm
ports:
- "9001:443"
environment:
CONNECTION_STRING: "Server=mysql.data; Port=3306; Database=mymicsapp.Services.catalogDb; Uid=sandhaka; Password=pwd"
ASPNETCORE_ENVIRONMENT: "Development"
depends_on:
- mysql.data
basket:
build: ./Services/Basket/Basket.Application
image: "sandhaka/mymicsapp_basket"
command: dotnet run --rm
ports:
- "9002:443"
environment:
REDIS_CONNECTION: "redis.data"
ASPNETCORE_ENVIRONMENT: "Development"
depends_on:
- redis.data
# I'm goind to use the same database for all the services but keep the aggregates separate.
# In a production environment I'll plan to use a dedicated one for each microservice
mysql.data:
image: "mysql:latest"
environment:
- MYSQL_ROOT_PASSWORD=pwd
- MYSQL_USER=sandhaka
- MYSQL_PASSWORD=pwd
volumes:
- $HOME/data/mymicsapp_db:/var/lib/mysql
ports:
- "3306:3306"
redis.data:
image: "redis"
ports:
- "6379:6379"
web.spa:
build: ./Clients/Web/spa
image: sandhaka/mymicsapp_webspa
ports:
- "443:443"
volumes:
- $HOME/mymicsapp/nginx-logs:/var/log/nginx