-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
91 lines (85 loc) · 2.62 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
version: "3.4"
services:
text-analyzer:
container_name: text-analyzer
image: text-analyzer:0.0.1
build:
context: ../text-analyzer
volumes:
- ../text-analyzer:/app/text-analyzer
ports:
- "8000:8000"
command: sh -c "python3 /app/text-analyzer/manage.py runserver 0.0.0.0:8000"
restart: on-failure
healthcheck:
test: curl --fail http://localhost:8000/health/ || exit 1
interval: 5s
retries: 5
start_period: 2s
timeout: 2s
app-database:
container_name: app-database
image: app-database:0.0.1
build:
context: ./database
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 10242048
volumes:
- ~/.social-app-docker/app-database/data:/var/lib/postgresql/data
ports:
- "5432:5432"
app-client:
container_name: app-client
image: app-client:0.0.1
build:
context: ../social-app-client
depends_on:
- app-server
volumes:
- ../social-app-client:/app/client
- app_client_node_modules:/app/client/node_modules
- app_client_runner:/app/client/docker
ports:
- "3081:3081"
command: /app/client/docker/runner.sh
app-server:
container_name: app-server
image: app-server:0.0.1
build:
context: ../social-app-server
depends_on:
- app-database
- text-analyzer
volumes:
- "../social-app-server:/app/server"
ports:
- "9090:8080"
- "5005:5005"
command: bash -c "mvn spring-boot:run -Dspring.profiles.active=dev -Dspring-boot.run.jvmArguments=\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005\""
restart: on-failure
healthcheck:
test: curl --fail http://app-server:9090/actuator/health || exit 1
interval: 5s
retries: 5
start_period: 2s
timeout: 2s
app-local-nginx:
container_name: app-local-nginx
image: app-local-nginx:0.0.1
build:
context: local-nginx
ports:
- "3080:80"
- "3000:80"
volumes:
- ./local-nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- app-server
- app-client
restart: unless-stopped
command: "supervisord -n"
volumes:
app_client_node_modules: {}
app_client_runner: {}