-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (61 loc) · 1.73 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
60
61
62
63
64
65
# version: '3'
version: '3.8'
services:
web:
build:
context: .
dockerfile: ./docker/web/Dockerfile
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- .:/app:cached
- public:/app/public
- tmp:/app/tmp
stdin_open: true
tty: true
environment:
MYSQL_ROOT_PASSWORD: "password"
DB_HOST: "db"
TZ: Asia/Tokyo
BASE_URL: "http://localhost:3000"
# RAILS_ENV: development
# DB_USERNAME: user
# DB_PASSWORD: password
depends_on:
- db
ports:
- "3000:3000"
db:
container_name: db
# 急にDBを作成できない問題発生したためダウングレード
image: mysql:8.0.31
# image: mysql:8.0.21
environment:
MYSQL_ROOT_PASSWORD: "password"
TZ: Asia/Tokyo
# MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
# MYSQL_DATABASE: app_development
# MYSQL_USER: user
# MYSQL_PASSWORD: password
ports:
- '3306:3306'
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./tmp/db:/var/lib/mysql
# - mysql-data:/var/lib/mysql
# nginx
nginx:
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- public:/portfolio01-app/public
- tmp:/portfolio01-app/tmp
ports:
- "80:80"
depends_on:
- web
volumes:
mysql-data:
tmp:
public: