forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
122 lines (115 loc) · 2.38 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
x-app: &default-app
image: agroportal/ontoportal_web_ui:master
env_file:
- ".env"
tty: true
volumes:
- bundle:/srv/ontoportal/bundle
- node:/node_modules
- rails_cache:/app/tmp/cache
- assets:/app/public/assets
- /var/run/docker.sock:/var/run/docker.sock
- .:/app
depends_on:
db:
condition: service_healthy
cache:
condition: service_started
node:
condition: service_started
environment: &env
BUNDLE_WITHOUT: ""
BUNDLE_PATH: /srv/ontoportal/bundle
DB_HOST: db
CACHE_HOST: cache
tmpfs:
- /tmp
- /app/tmp/pids
services:
db:
image: "mysql:8.0"
networks:
- default
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 5s
retries: 3
cache:
image: memcached:latest
restart: unless-stopped
command: ["-m", "1024"]
networks:
- default
ports:
- "11211:11211"
node:
<<: *default-app
command: "yarn build --watch"
depends_on:
- cache
- db
dev:
<<: *default-app
ports:
- "3000:3000"
links:
- db
- cache
production:
<<: *default-app
command: "bundle exec puma -C config/puma.rb"
environment:
<<: *env
RAILS_ENV: "production"
BUNDLE_WITHOUT: "development test"
BUNDLE_PATH: "/usr/local/bundle"
#SECRET_KEY_BASE: TODO
#RAILS_MASTER_KEY: TODO
BIOPORTAL_WEB_UI_DATABASE_PASSWORD: root
MEMCACHE_SERVERS: "cache:11211"
ports:
- "3000:3000"
links:
- db
- cache
depends_on:
db:
condition: service_healthy
cache:
condition: service_started
volumes:
- node:/node_modules
- rails_cache:/app/tmp/cache
- assets:/app/public/assets
- app_ui:/app
test:
<<: *default-app
depends_on:
- db
- cache
- chrome-server
network_mode: "host"
environment:
BUNDLE_WITHOUT: ""
DB_HOST: 127.0.0.1
CACHE_HOST: 127.0.0.1
chrome-server:
image: selenium/standalone-chrome:112.0-chromedriver-112.0-grid-4.9.0-20230421
shm_size: 2g
network_mode: 'host'
# ports:
# - "4444:4444"
# - "7900:7900"
volumes:
mysql-data:
bundle:
rails_cache:
assets:
node:
app_ui: