forked from expertiza/expertiza
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
49 lines (49 loc) · 1.21 KB
/
docker-compose.yaml
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
version: "3.9" # optional since v1.27.0
services:
web:
build:
context: .
dockerfile: local.dockerfile
ports:
- "3000:3000"
volumes:
- .:/app
links:
- redis
- mysql
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
environment:
JAVA_HOME: "/usr/lib/jvm/java-1.8.0-openjdk-amd64"
RAILS_ENV: development
REDIS_HOST: redis
entrypoint: ["/app/docker_entrypoint.sh"]
restart: on-failure:3
command: /bin/sh "while sleep 1000; do :; done"
redis:
image: redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
mysql:
image: mysql:5.7
ports:
- "3306:3306"
volumes:
- ./expertiza-db:/var/lib/mysql:rw
environment:
MYSQL_ROOT_PASSWORD: expertiza
MYSQL_DATABASE: expertiza_production
healthcheck:
test: out=$$(mysqladmin ping -h localhost -P 3306 -u root --password=$$MYSQL_ROOT_PASSWORD 2>&1); echo $$out | grep 'mysqld is alive' || { echo $$out; exit 1; }
timeout: 20s
retries: 25
restart: on-failure:3
user: mysql
command: [--ignore-db-dir=lost+found]
volumes:
logvolume01: {}