File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ to link them together and expose the web app's port.
50
50
services:
51
51
db:
52
52
image: postgres
53
+ volumes:
54
+ - ./tmp/db:/var/lib/postgresql/data
53
55
web:
54
56
build: .
55
57
command: bundle exec rails s -p 3000 -b '0.0.0.0'
@@ -231,10 +233,7 @@ application with `docker-compose up`.
231
233
232
234
### Restart the application
233
235
234
- To restart the application:
235
-
236
- 1 . Run ` docker-compose up ` in the project directory.
237
- 2 . Run this command in another terminal to restart the database: ` docker-compose run web rake db:create `
236
+ To restart the application run ` docker-compose up ` in the project directory.
238
237
239
238
### Rebuild the application
240
239
@@ -254,8 +253,7 @@ the changes:
254
253
ports: - "3001:3000"
255
254
```
256
255
257
- Now, rebuild and restart the app with ` docker-compose up --build ` , then restart
258
- the database: ` docker-compose run web rake db:create ` .
256
+ Now, rebuild and restart the app with ` docker-compose up --build ` .
259
257
260
258
Inside the container, your app is running on the same port as before ` 3000 ` , but
261
259
the Rails Welcome is now available on ` http://localhost:3001 ` on your local
You can’t perform that action at this time.
0 commit comments