-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yml
140 lines (129 loc) · 2.95 KB
/
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
# Container name is IMPORTANT.
# It is used in the vite.config.js file to proxy the requests to the backend and other services.
# If you change the container name, you need to update the vite.config.js file as well.
# redisinsight and pgadmin are optional. You can remove them if you don't need them.
services:
frontend:
build:
context: ./frontend
args:
VITE_FMP_API_URL: http://127.0.0.1:8000/api
container_name: fmp-frontend
env_file:
- .env
ports:
- "5173:5173"
networks:
- my_network
restart: unless-stopped
backend:
build:
context: ./backend
container_name: fmp-backend
env_file:
- .env
ports:
- "8000:8000"
depends_on: # Remove if you use sqlite
postgres:
condition: service_healthy
networks:
- my_network
restart: unless-stopped
# Remove if you use sqlite
postgres:
image: postgres:15.4
container_name: fmp-db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
env_file:
- .env
networks:
- my_network
restart: unless-stopped
z3:
build:
context: ./z3-api
dockerfile: Dockerfile
container_name: fmp-z3-api
environment:
API_URL: http://fmp-backend:8000/
REDIS_URL: redis://redis:6379/0
depends_on:
- redis
networks:
- my_network
nuxmv:
build:
context: ./nuxmv-api
dockerfile: Dockerfile
container_name: fmp-nuxmv-api
environment:
API_URL: http://fmp-backend:8000/
REDIS_URL: redis://redis:6379/0
depends_on:
- redis
networks:
- my_network
alloy:
build:
context: ./alloy-api
container_name: fmp-alloy-api
environment:
API_URL: http://fmp-backend:8000/
networks:
- my_network
restart: unless-stopped
spectra:
build:
context: ./spectra-api
dockerfile: Dockerfile
container_name: fmp-spectra-api
environment:
API_URL: http://fmp-backend:8000/
REDIS_URL: redis://redis:6379/0
depends_on:
- redis
networks:
- my_network
redis:
image: redis:alpine
container_name: fmp-redis
ports:
- "6379:6379"
networks:
- my_network
redisinsight:
image: redis/redisinsight:latest
container_name: fmp-redisinsight
ports:
- "5540:5540"
networks:
- my_network
pgadmin:
image: dpage/pgadmin4:latest
container_name: fmp-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: soaib@soaib.me
PGADMIN_DEFAULT_PASSWORD: Soaib@123
ports:
- "5050:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
networks:
- my_network
networks:
my_network:
external: true
volumes:
pgadmin_data:
postgres_data: