-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (65 loc) · 1.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (65 loc) · 1.71 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
version: '3'
services:
nats-server:
image: nats:latest
ports:
- 8222:8222
client-gateway:
build: ./client-gateway
ports:
- ${CLIENT_GATEWAY_PORT}:3000
volumes:
- ./client-gateway/src:/usr/src/app/src
command: npm run start:dev
environment:
- PORT=3000
- NATS_SERVERS=nats://nats-server:4222
products-ms:
build: ./products-ms
volumes:
- ./products-ms/src:/usr/src/app/src
command: npm run start:dev
environment:
- PORT=3001
- NATS_SERVERS=nats://nats-server:4222
- DATABASE_URL=file:./dev.db
orders-ms:
depends_on:
- orders-db
build: ./orders-ms
volumes:
- ./orders-ms/src:/usr/src/app/src
command: npm run start:dev
environment:
- PORT=3002
- NATS_SERVERS=nats://nats-server:4222
- DATABASE_URL=postgresql://user:123@orders-db:5432/orderdb?schema=public
orders-db:
image: postgres:16.2
restart: always
volumes:
- ./orders-ms/postgres:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=123
- POSTGRES_DB=orderdb
# =====================
# Payments Microservice
#======================
payments-ms:
container_name: payments-ms
build: ./payments-ms
volumes:
- ./payments-ms/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://nats-server:4222
- STRIPE_SECRET=${STRIPE_SECRET}
- STRIPE_SUCCESS_URL=${STRIPE_SUCCESS_URL}
- STRIPE_CANCEL_URL=${STRIPE_CANCEL_URL}
- STRIPE_ENDPOINT_SECRET=${STRIPE_ENDPOINT_SECRET}