-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (46 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
50 lines (46 loc) · 1.08 KB
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
version: '3'
services:
db:
image: postgres
container_name: db
volumes:
- ./config/postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: "postgres"
POSTGRES_HOST_AUTH_METHOD: "trust"
ports:
- "5432:5432"
rails:
build:
context: "."
dockerfile: "Dockerfile_rails"
container_name: rails
volumes:
- ./volume/blog-backend:/app
depends_on:
- db
environment:
RUBYOPT: "-W:no-deprecated -W:no-experimental"
RAILS_MASTER_KEY: "a667717bf0a47475b0582547379c816d"
# "${RAILS_MASTER_KEY}"
tty: true
command: rails server -b 0
ports:
- "3000:3000"
vue:
build:
context: "."
dockerfile: "Dockerfile_vue"
container_name: vue
volumes:
- ./volume/blog-frontend:/app
ports:
- "8080:8080"
tty: true
command: bash -c "yarn && yarn serve"
# docker-compose build
# docker-compose run rails rake db:create
# docker-compose run rails rake db:migrate
# docker-compose run rails rake db:seed
# docker-compose up -d
# localhost:3000