-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (36 loc) · 918 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (36 loc) · 918 Bytes
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
services:
mysql_service:
container_name: mysql_service
image: mysql:8.0.39
platform: linux/x86_64
environment:
LANG: C.UTF-8
MYSQL_ROOT_PASSWORD: P1UmodzAm
MYSQL_DATABASE: database-name-development
ports:
- '3309:3306'
volumes:
- database-name-development-mysql_service:/var/lib/mysql
- ./db/mysql-init:/docker-entrypoint-initdb.d
hostname: mysql_service
web:
build:
context: .
dockerfile: Dockerfile
tty: true
stdin_open: true
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- .:/app
working_dir: /app
depends_on:
- mysql_service
ports:
- "3000:3000"
environment:
MYSQL_HOST: mysql_service
MYSQL_ROOT_PASSWORD: P1UmodzAm
RAILS_ENV: development
volumes:
database-name-development-mysql_service:
driver: local