-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
130 lines (120 loc) · 3.73 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
networks:
poc-nestjs:
driver: bridge
services:
base-image-development:
image: pocnestjs-base-dev:latest
build:
context: .
args:
NODE_ENV: development
base-image-production:
image: pocnestjs-base-prod:latest
build:
context: .
args:
NODE_ENV: production
auth-service:
image: shimisnow/pocnestjs-auth-service:latest
build:
context: .
dockerfile: apps/auth-service/Dockerfile
container_name: poc-nestjs-auth-service
environment:
AUTH_SERVICE_PORT: ${AUTH_SERVICE_PORT}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
DATABASE_AUTH_HOST: ${DATABASE_AUTH_HOST}
DATABASE_AUTH_PORT: ${DATABASE_AUTH_PORT}
DATABASE_AUTH_USERNAME: ${DATABASE_AUTH_USERNAME}
DATABASE_AUTH_PASSWORD: ${DATABASE_AUTH_PASSWORD}
DATABASE_AUTH_DBNAME: ${DATABASE_AUTH_DBNAME}
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
JWT_REFRESH_SECRET_KEY: ${JWT_REFRESH_SECRET_KEY}
JWT_REFRESH_EXPIRES_IN: ${JWT_REFRESH_EXPIRES_IN}
JWT_REFRESH_MAX_AGE: ${JWT_REFRESH_MAX_AGE}
AUTH_SERVICE_BUILD_OPENAPI: ${AUTH_SERVICE_BUILD_OPENAPI}
networks:
- poc-nestjs
ports:
- ${AUTH_SERVICE_PORT}:${AUTH_SERVICE_PORT}
financial-service:
image: shimisnow/pocnestjs-financial-service:latest
build:
context: .
dockerfile: apps/financial-service/Dockerfile
container_name: poc-nestjs-financial-service
environment:
FINANCIAL_SERVICE_PORT: ${FINANCIAL_SERVICE_PORT}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
DATABASE_FINANCIAL_HOST: ${DATABASE_FINANCIAL_HOST}
DATABASE_FINANCIAL_PORT: ${DATABASE_FINANCIAL_PORT}
DATABASE_FINANCIAL_USERNAME: ${DATABASE_FINANCIAL_USERNAME}
DATABASE_FINANCIAL_PASSWORD: ${DATABASE_FINANCIAL_PASSWORD}
DATABASE_FINANCIAL_DBNAME: ${DATABASE_FINANCIAL_DBNAME}
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
JWT_MAX_AGE: ${JWT_MAX_AGE}
FINANCIAL_SERVICE_BUILD_OPENAPI: ${FINANCIAL_SERVICE_BUILD_OPENAPI}
FINANCIAL_SERVICE_AUTH_VERIFY_ENDPOINT: ${FINANCIAL_SERVICE_AUTH_VERIFY_ENDPOINT}
networks:
- poc-nestjs
ports:
- ${FINANCIAL_SERVICE_PORT}:${FINANCIAL_SERVICE_PORT}
redis:
image: redis:7.4.1
networks:
- poc-nestjs
restart: always
ports:
- ${REDIS_PORT}:6379
redis-ui:
image: patrikx3/p3x-redis-ui:2024.10.106
networks:
- poc-nestjs
ports:
- 7843:7843
volumes:
- ./deployment/redis-ui:/settings
database-authentication:
image: postgres:17.0
restart: always
environment:
POSTGRES_USER: ${DATABASE_AUTH_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_AUTH_PASSWORD}
POSTGRES_DB: ${DATABASE_AUTH_DBNAME}
networks:
- poc-nestjs
ports:
- ${DATABASE_AUTH_PORT}:5432
volumes:
- ./deployment/database/authentication:/docker-entrypoint-initdb.d:ro
database-financial:
image: postgres:17.0
restart: always
environment:
POSTGRES_USER: ${DATABASE_FINANCIAL_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_FINANCIAL_PASSWORD}
POSTGRES_DB: ${DATABASE_FINANCIAL_DBNAME}
networks:
- poc-nestjs
ports:
- ${DATABASE_FINANCIAL_PORT}:5432
volumes:
- ./deployment/database/financial:/docker-entrypoint-initdb.d:ro
auth-service-openapi:
image: nginx:1.27.2-alpine3.20
restart: always
ports:
- 8081:80
volumes:
- ./apps/auth-service/docs/openapi:/usr/share/nginx/html:ro
financial-service-openapi:
image: nginx:1.27.2-alpine3.20
restart: always
ports:
- 8082:80
volumes:
- ./apps/financial-service/docs/openapi:/usr/share/nginx/html:ro