-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
85 lines (78 loc) · 2.29 KB
/
docker-compose.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3.8'
services:
nats-server:
image: nats:latest
ports:
- '8222:8222'
#~> Client Gateway Microservice
client_gateway:
build: ./client_gateway
ports:
- ${CLIENT_GATEWAY_DOCKER_PORT}:${CLIENT_GATEWAY_PORT}
volumes:
- ./client_gateway/src:/usr/src/app/src
command: npm run start:dev
environment:
- PORT=${CLIENT_GATEWAY_MS_PORT}
- NATS_SERVERS=${NATS_SERVERS}
#~> Auth Microservice
auth_microservice:
build: ./auth_microservice
volumes:
- ./auth_microservice/src:/usr/src/app/src
command: npm run start:dev
environment:
- PORT=${AUTH_MS_PORT}
- NATS_SERVERS=${NATS_SERVERS}
- DATABASE_URL=${AUTH_DATABASE_URL}
- JWT_SECRET=${AUTH_JWT_SECRET}
#~> Products Microservice
products_microservice:
build: ./products_microservice
volumes:
- ./products_microservice/src:/usr/src/app/src
command: npm run start:dev
environment:
- PORT=${PRODUCTS_MS_PORT}
- NATS_SERVERS=${NATS_SERVERS}
- DATABASE_URL=${PRODUCTS_DATABASE_URL}
#~> Orders Microservice
orders_microservice:
depends_on:
- orders-db
build: ./orders_microservice
volumes:
- ./orders_microservice/src:/usr/src/app/src
command: npm run start:dev
environment:
- PORT=${ORDERS_MS_PORT}
- DATABASE_URL=${ORDERS_DATABASE_URL}
- NATS_SERVERS=${NATS_SERVERS}
#~> Orders Database
orders-db:
container_name: orders_database
image: postgres:latest
restart: always
volumes:
- ./orders_microservice/postgres:/var/lib/postgresql/data
ports:
- ${ORDERS_DB_DOCKER_PORT}:${ORDERS_DB_PORT}
environment:
- POSTGRES_USER=${ORDERS_DB_USER}
- POSTGRES_PASSWORD=${ORDERS_DB_PASSWORD}
- POSTGRES_DB=${ORDERS_DB_NAME}
#~> Payments Microservice
payments_microservice:
container_name: payments_microservice
build: ./payments_microservice
volumes:
- ./payments_microservice/src:/usr/src/app/src
command: npm run start:dev
ports:
- ${PAYMENTS_MS_PORT}:${PAYMENTS_MS_PORT}
environment:
- PORT=${PAYMENTS_MS_PORT}
- NATS_SERVERS=${NATS_SERVERS}
- STRIPE_SECRET=${PAYMENTS_STRIPE_SECRET}
- BASE_URL=${STRIPE_BASE_URL}
- STRIPE_ENDPOINT_SECRET=${PAYMENTS_STRIPE_ENDPOINT_SECRET}