-
Notifications
You must be signed in to change notification settings - Fork 11
/
openshift-compose.yml
167 lines (156 loc) · 4.29 KB
/
openshift-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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
version: "3"
services:
####################### PostgreSQL Database Definition #######################
postgresql:
restart: always
container_name: prime-postgresql-db
image: postgres:10.6
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USERNAME: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- local_postgres_data:/var/lib/postgresql/data
networks:
- openshift
####################### MongoDB Definition #######################
# mongo:
# restart: always
# container_name: primemongodb
# image: mongo:3
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: prime
# ports:
# - 8081:8081
# volumes:
# - local_mongodb_data:/var/lib/mongodb/data
# networks:
# - primenet
####################### Redis Definition #######################
redis:
image: redis:3.2-alpine
container_name: prime_cache
restart: always
command: redis-server --requirepass redis-password
ports:
- "6379:6379"
networks:
- openshift
####################### API Backend Definition #######################
dotnet-webapi:
container_name: prime-webapi-backend
restart: always
build:
context: prime-dotnet-webapi/
dockerfile: openshift.dockerfile
environment:
DB_HOST: prime-postgresql-db
PGPASSWORD: postgres
POSTGRESQL_ADMIN_PASSWORD: postgres
POSTGRESQL_USERNAME: postgres
POSTGRESQL_DATABASE: postgres
DB_CONNECTION_STRING: "host=primedb;port=5432;database=postgres;username=postgres;password=postgres"
ASPNETCORE_HTTPS_PORT: "5001"
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:8080"
DOTNET_CLI_HOME: "/tmp/DOTNET_CLI_HOME"
ports:
- "5000:8080"
- "5001:5001"
networks:
- openshift
depends_on:
- postgresql
####################### Web Frontend Definition #######################
nginx-angular:
container_name: prime-frontend
build:
context: prime-angular-frontend/
dockerfile: openshift.dockerfile
args:
KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID}
KEYCLOAK_REALM: ${KEYCLOAK_REALM}
KEYCLOAK_URL: ${KEYCLOAK_URL}
REDIRECT_URL: ${REDIRECT_URL}
JWT_WELL_KNOWN_CONFIG: ${JWT_WELL_KNOWN_CONFIG}
# command: "nginx -g 'daemon off;'"
restart: always
ports:
- "8080:8080"
- "4200:8080"
expose:
- "8080"
- "4200"
networks:
- openshift
depends_on:
- dotnet-webapi
####################### Local SMTP Server Definition #######################
# mailhog:
# container_name: mailhog
# restart: always
# image: mailhog/mailhog:latest
# ports:
# - 25:1025
# - 1025:1025
# - 8025:8025 # Visit localhost:8025 to see the list of captured emails
# networks:
# - primenet
####################### Database Inspection Definition #######################
# schema-spy:
# container_name: schema-spy
# build:
# context: schemaspy/
# image: openjdk:jre-alpine
# ports:
# - "8069:8069"
# - "80:8069"
# depends_on:
# - postgres
# networks:
# - primenet
####################### Backup Definition #######################
# backup:
# container_name: backup
# build:
# context: prime-database-backup
# ports:
# - 6432:5432
# - 9081:8081
# depends_on:
# - postgres
# - mongo
# volumes:
# - db_backup_data:/opt/backup
# - local_postgres_data:/var/lib/postgresql/data
# networks:
# - primenet
####################### Document Manager Definition #######################
document-manager:
restart: always
container_name: prime-document-manager
build:
context: document-manager/backend
dockerfile: openshift.dockerfile
args:
BUILD_LOGLEVEL: ${BUILD_LOGLEVEL}
ports:
- 6001:6001
volumes:
- ./document-manager/backend/:/app/
depends_on:
- postgresql
# - redis
networks:
- openshift
####################### Networks Definition #######################
networks:
openshift:
####################### Volumes Definition #######################
volumes:
local_postgres_data:
local_mongodb_data:
db_backup_data: