-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
103 lines (95 loc) · 2.01 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
services:
backend:
container_name: api
restart: unless-stopped
tty: true
build:
context: ./api
dockerfile: ./api.Dockerfile
volumes:
- ./api:/var/www
networks:
- app-network
client:
container_name: client
command: sh -c "npm install && npm run dev"
depends_on:
- server
build:
context: ./client
dockerfile: ./client.Dockerfile
ports:
- "3000:3000"
volumes:
- ./client:/usr/src
networks:
- app-network
database:
image: mysql:8.0
container_name: database
restart: unless-stopped
tty: true
ports:
- "3308:3306"
environment:
MYSQL_DATABASE: news-aggregator
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD:
volumes:
- dbdata:/var/lib/mysql/
networks:
- app-network
server:
image: nginx:alpine
container_name: server
restart: unless-stopped
tty: true
ports:
- "8008:80"
volumes:
- ./api:/var/www
- ./nginx/conf.d/:/etc/nginx/conf.d/
networks:
- app-network
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
container_name: elasticsearch
depends_on:
- client
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- cluster.routing.allocation.disk.threshold_enabled=false
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- app-network
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:8.8.0
container_name: kibana
volumes:
- kbdata:/usr/share/kibana/data
ports:
- 5601:5601
restart: always
environment:
ELASTICSEARCH_HOSTS: '["http://localhost:9200","http://elasticsearch:9200"]'
networks:
- app-network
volumes:
dbdata:
kbdata:
driver: local
esdata:
driver: local
networks:
app-network:
driver: bridge