-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (39 loc) · 912 Bytes
/
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
version: "3.7"
services:
db:
image: mysql:8.0.20
container_name: database
volumes:
- mysql:/var/lib/mysql:delegated
ports:
- "3307:3306"
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: app
MYSQL_USER: root
MYSQL_PASSWORD: root
web:
build:
context: .
dockerfile: Dockerfile
command: bash -c "rm -f tmp/pids/server.pid && rake db:migrate && bundle exec rails s -p 3000 -b '0.0.0.0'"
tty: true
stdin_open: true
env_file: .env
depends_on:
- db
ports:
- "3000:3000"
volumes:
- .:/app:cached
- bundle:/usr/local/bundle:delegated
- node_modules:/app/node_modules
- tmp-data:/app/tmp/sockets
volumes:
mysql:
bundle:
node_modules:
tmp-data: