-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (43 loc) · 961 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
42
43
44
45
46
version: '3.7'
services:
db:
image: mysql:5.7
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_DATABASE: ${DATABASE_NAME}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
ports:
- 4306:3306
volumes:
- mysql-db:/var/lib/mysql
backend:
tty: true
depends_on:
- db
build:
context: ./backend/
dockerfile: Dockerfile
ports:
- 3000:3000
volumes:
- ./backend:/app
command: rails server -b 0.0.0.0
environment:
adapter: mysql2
pool: 5
host: ${DATABASE_HOST}
username: ${DATABASE_USER}
password: ${DATABASE_PASSWORD}
frontend:
build:
context: ./frontend/
dockerfile: Dockerfile
volumes:
- ./frontend/app:/usr/src/app
command: 'yarn dev'
ports:
- "8000:3000"
volumes:
mysql-db:
driver: local