-
Notifications
You must be signed in to change notification settings - Fork 20
/
docker-compose.yml
94 lines (84 loc) · 2.12 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
# docker-compose file to setup:
# - mysql
# - elasticsearch
# - backend: depends on mysql and elasticsearch
# - frontnend: depends on backend
# This file is meant to aid local development and testing. It *must not* be
# used for production deployment.
version: "3.5"
services:
mysql:
container_name: biotools-mysql
image: mysql:8.0.23
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=elixirroot
- MYSQL_DATABASE=elixir
- MYSQL_USER=elixir
- MYSQL_PASSWORD=123
volumes:
- "data-mysql:/var/lib/mysql"
ports:
- "3306:3306"
networks:
- net
elasticsearch:
container_name: biotools-elasticsearch
image: elasticsearch:7.12.1
restart: unless-stopped
environment:
- xpack.security.enabled=false
- discovery.type=single-node
volumes:
- "data-elasticsearch:/usr/share/elasticsearch/data"
ports:
- "9200:9200"
- "9300:9300"
networks:
- net
backend:
container_name: biotools-backend
image: biotools/backend:latest
build:
context: ./backend
environment:
- BIOTOOLS_ELASTIC_SEARCH_URLS=http://elasticsearch:9200
- BIOTOOLS_MYSQL_DB=elixir
- BIOTOOLS_MYSQL_HOST=mysql
- BIOTOOLS_MYSQL_PASSWORD=123
- BIOTOOLS_MYSQL_USER=elixir
ports:
- "8000:80"
networks:
- net
depends_on:
- mysql
- elasticsearch
links:
- mysql
- elasticsearch
volumes:
- ./backend:/elixir/application/backend:consistent
- ./frontend:/elixir/application/frontend
# dockerfile in frontend dir
frontend:
container_name: biotools-frontend
image: biotools/frontend:latest
build:
context: ./frontend
networks:
- net
depends_on:
- backend
volumes:
- ./frontend:/home/biotools/frontend:consistent
- biotools_node_modules:/home/biotools/frontend/node_modules
- biotools_bower_components:/home/biotools/frontend/bower_components
networks:
net:
name: biotools-net
volumes:
data-mysql: {}
data-elasticsearch: {}
biotools_node_modules: {}
biotools_bower_components: {}