-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
41 lines (34 loc) · 1.12 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
# Use the file format compatible with Docker Compose 3.8
version: "3.8"
# Each thing that Docker Compose runs is referred to as
# a "service". In our case, our Rails application is one
# service ("web") and our webpacker dev server
# is another service ("webpacker").
services:
web:
# The root directory from which we're building.
build: .
# This makes it so any code changes inside the project
# directory get synced with Docker. Without this line,
# we'd have to restart the container every time we
# changed a file.
volumes:
- .:/code:cached
# The command to be run when we run "docker-compose up".
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
# Expose port 3000.
ports:
- "3000:3000"
depends_on:
- webpacker
# Specify the values of the environment variables
# used in this container.
environment:
RAILS_ENV: development
webpacker:
build: .
command: bash -c "rm -rf /usr/src/app/public/packs; /usr/src/app/bin/webpack-dev-server"
volumes:
- .:/usr/src/app
ports:
- "3035:3035"