generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
128 lines (110 loc) · 3.02 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
networks:
app-network:
driver: bridge
services:
# Angular Frontend App
frontend:
extends:
file: docker-compose.base.yml
service: nx-app-base
#command: npm run frontend:dev:docker
#command: ['npm', 'run', 'fe-docker']
command: nx serve metadata-analyzer-frontend --host 0.0.0.0
ports:
- 4200:4200
depends_on:
- backendDatabase
networks:
- app-network
# Nest Backend App
backend:
extends:
file: docker-compose.base.yml
service: nx-app-base
#command: npm run backend:dev:docker
#command: ['npm', 'run', 'be', '--host localhost']
command: nx serve metadata-analyzer-backend --host 0.0.0.0
environment:
- ANALYZER_URL=${ANALYZER_URL}
# Backend Database
- DATABASE_HOST=${BACKEND_DATABASE_HOST}
- DATABASE_PORT=${BACKEND_DATABASE_PORT}
- DATABASE_USER=${BACKEND_DATABASE_USER}
- DATABASE_PASSWORD=${BACKEND_DATABASE_PASSWORD}
- DATABASE_DATABASE=${BACKEND_DATABASE_DATABASE}
# Mail Service
- MAIL_HOST=${MAIL_HOST}
- MAIL_PORT=${MAIL_PORT}
- MAIL_USER=${MAIL_USER}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- MAIL_FROM=${MAIL_FROM}
- MAILING_LIST=${MAILING_LIST}
env_file:
- .env.docker
ports:
- 3000:3000 # API Entry port
depends_on:
- backendDatabase
networks:
- app-network
# - 4311:4311 # Server Debugging port
# Python Analyzer Backend App
analyzer:
# extends:
# file: docker-compose.base.yml
# service: nx-app-base
build:
context: ./apps/analyzer
dockerfile: Dockerfile
command: ['/app/.venv/bin/python3', 'main.py', '--host', '0.0.0.0']
environment:
# Flask
- FLASK_RUN_HOST=${ANALYZER_FLASK_RUN_HOST}
- FLASK_RUN_PORT=${ANALYZER_FLASK_RUN_PORT}
- BACKEND_URL=${BACKEND_URL}
# Analyzer Database
- DATABASE_HOST=${ANALYZER_DATABASE_HOST}
- DATABASE_PORT=${ANALYZER_DATABASE_PORT}
- DATABASE_USER=${ANALYZER_DATABASE_USER}
- DATABASE_PASSWORD=${ANALYZER_DATABASE_PASSWORD}
- DATABASE_DATABASE=${ANALYZER_DATABASE_DATABASE}
env_file:
- .env.docker
ports:
- 8000:8000
depends_on:
- analyzerDatabase
- backend
networks:
- app-network
# Backend Database
backendDatabase:
image: postgres
container_name: backendDatabase
restart: always
ports:
- 5443:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
networks:
- app-network
# Analyzer Database
analyzerDatabase:
image: postgres
container_name: analyzerDatabase
restart: always
ports:
- 5442:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
networks:
- app-network
volumes:
- ./db_dump.sql:/docker-entrypoint-initdb.d/db_dump.sql
- ./00-init-roles.sql:/docker-entrypoint-initdb.d/00-init-roles.sql
volumes:
mono-node-modules: null