-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
116 lines (115 loc) · 2.8 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
version: '3.8'
services:
api:
container_name: cloudnest-api
image: cloudnest-api:1.0.0
build:
context: .
target: development
command: npm run start:debug api
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
ports:
- ${API_PORT}:${API_PORT}
- ${API_MS_PORT}:${API_MS_PORT}
env_file:
- .env
depends_on:
- db
auth:
container_name: cloudnest-auth
image: cloudnest-auth:1.0.0
build:
context: .
target: development
command: npm run start:debug auth
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
ports:
- ${AUTH_PORT}:${AUTH_PORT}
env_file:
- .env
depends_on:
- db
transactions:
container_name: cloudnest-transactions
image: cloudnest-transactions:1.0.0
build:
context: .
target: development
command: npm run start:debug transactions
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
ports:
- ${TRANSACTIONS_PORT}:${TRANSACTIONS_PORT}
- ${TRANSACTIONS_MS_PORT}:${TRANSACTIONS_MS_PORT}
env_file:
- .env
depends_on:
- transactions-db
db:
container_name: cloudnest-db
image: postgres:14.0-alpine
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
expose:
- ${POSTGRES_PORT}
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5
transactions-db:
container_name: cloudnest-transactions-db
image: postgres:14.0-alpine
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- ${TRANSACTIONS_DB_PORT}:${POSTGRES_PORT}
expose:
- ${TRANSACTIONS_DB_PORT}
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 5
proxy:
container_name: proxy
image: nginx
logging:
driver: none
ports:
- 80:80
volumes:
- ./apps/proxy/config:/etc/nginx
depends_on:
- api
- auth
- transactions
# mongo:
# container_name: cloudnest-mongo
# image: mongo:4.2.23-bionic
# restart: always
# environment:
# - MONGO_INITDB_ROOT_USERNAME=root
# - MONGO_INITDB_ROOT_PASSWORD=example
# - MONGO_INITDB_DATABASE=dev
# mongo-express:
# container_name: cloudnest-mongo-express
# image: mongo-express
# restart: always
# ports:
# - 8081:8081
# environment:
# - ME_CONFIG_MONGODB_ADMINUSERNAME=root
# - ME_CONFIG_MONGODB_ADMINPASSWORD=example
# - ME_CONFIG_MONGODB_URL=mongodb://root:example@mongo:27017/