-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
59 lines (54 loc) · 1.35 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
version: '3'
services:
app:
build: .
entrypoint: 'docker-entrypoint.sh'
command: ['rails', 's', '-p', '3000', '-b', '0.0.0.0']
environment:
- DATABASE_USER=cedar
- DATABASE_PASSWORD=cedar
- DATABASE_NAME=cedar_development
- DATABASE_HOST=db
- RAILS_ENV=development
- RAILS_SERVE_STATIC_FILES=true
- RAILS_CACHE_STORE_URL=memcache
ports:
- 3000:3000
depends_on:
- db
- memcached
- worker
volumes:
- .:/cedar-app
db:
image: mysql:8.0
restart: always
environment:
- MYSQL_USER=cedar
- MYSQL_PASSWORD=cedar
- MYSQL_DATABASE=cedar_development
- MYSQL_ROOT_PASSWORD=my-secret-password
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password
volumes:
- db:/var/lib/mysql
memcached:
image: bitnami/memcached
worker:
build: .
entrypoint: 'docker-entrypoint.sh'
command: ['rake', 'jobs:work']
environment:
- DATABASE_USER=cedar
- DATABASE_PASSWORD=cedar
- DATABASE_NAME=cedar_development
- DATABASE_HOST=db
- RAILS_ENV=development
- RAILS_SERVE_STATIC_FILES=true
- RAILS_CACHE_STORE_URL=memcache
depends_on:
- db
- memcached
volumes:
- .:/cedar-app
volumes:
db: