forked from olacabs/jackhammer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·49 lines (49 loc) · 1.27 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
version: '3'
volumes:
# We'll define a volume that will store the data from the mysql databases:
mysql-data:
driver: local
services:
mysqldb:
image: mysql
container_name: jackhmmaer-db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_DATABASE: jackhammer_production
ports:
- "3306:3306"
volumes:
- mysql-data:/usr/local/bin/mysql
restart: always
healthcheck:
test: "nc -z localhost 3306"
interval: 1s
retries: 120
web:
build: ./web
volumes:
- '.:/jackhammer'
ports:
- "5000:3000"
command: bash -c "mkdir -p tmp/pids && RAILS_ENV=production bundle exec sidekiq -C config/sidekiq.yml -d && bundle exec puma -e production -b tcp://0.0.0.0:3000"
environment:
- REDIS_URL=redis://redis:6379
- SECRET_KEY_BASE=454ab84a2554a5e715db90c7560a06d8a20811d614e7313de05495ecdeac9614c4c3d263df1a5892b92d6c32ea06d4defbd2492c598e8295f89b8b316db25842
- RAILS_SERVE_STATIC_FILES=true
- RAILS_ENV=production
- MYSQL_DB=jackhammer_production
- MYSQL_HOST=mysqldb
- MYSQL_USER=root
- MYSQL_PASSWORD=root
links:
- mysqldb:mysqldb
- redis:redis
depends_on:
- mysqldb
- redis
redis:
image: redis
ports:
- "6379"