Skip to content

Instantly share code, notes, and snippets.

@dutsik
Created July 10, 2018 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dutsik/a0d571fa2de886ceee6cd099e8371236 to your computer and use it in GitHub Desktop.
Save dutsik/a0d571fa2de886ceee6cd099e8371236 to your computer and use it in GitHub Desktop.
``` bash
docker run --rm -v ${PWD}:/usr/src -w /usr/src -ti ruby:2.5.1 bash ; cd app
```
``` bash
gem install rails
# Last, we'll create the project skeleton (your options may vary) - but let's
# disable running bundler after the project creation, as it may take a couple
# of minutes, and we'll end up removing this container, so the install is of
# no use here:
rails new app --database=postgresql --webpack=vue --skip-bundle
# We've finished! Let's exit the container and look for our newly generated
# project skeleton:
exit
```
To make things easier, we will add new service in our docker-compose running webpacker in development enviroment.
```yml
webpacker:
build:
context: .
dockerfile: dev.Dockerfile
command: bundle exec bin/webpack-dev-server
volumes:
- .:/usr/src/app
ports:
- "8080:8080"
networks:
- net
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment