-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
48 lines (48 loc) · 1.16 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
version: '3'
services:
db:
image: postgres:12
volumes:
- ./tmp/db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=password
web:
build: .
env_file: .env
image: mercari-clone:latest
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- .:/myapp
- bundle:/usr/local/bundle
- node_modules:/myapp/node_modules
ports:
- "3000:3000"
depends_on:
- db
environment:
WEBPACKER_DEV_SERVER_HOST: webpack-dev-server
tailwindcss-watch:
image: mercari-clone:latest
volumes:
- .:/myapp
- bundle:/usr/local/bundle
- node_modules:/myapp/node_modules
command: ["rails", "tailwindcss:watch"]
tty: true
webpack-dev-server:
image: mercari-clone:latest
volumes:
- .:/myapp
- bundle:/usr/local/bundle
- node_modules:/myapp/node_modules
environment:
NODE_ENV: development
RAILS_ENV: development
WEBPACKER_DEV_SERVER_HOST: 0.0.0.0
NODE_OPTIONS: --openssl-legacy-provider
command: ./bin/webpack-dev-server
ports:
- '3035:3035'
volumes:
bundle:
node_modules: