docker-compose up -d
- wait for it...
- visit
localhost:3000
- rejoice!
You can either run:
$ docker-compose exec web sh
or
$ bin/ssh_to_container
Renaming your app is super simple, first clone into its own folder. Then update the following:
config/application.rb
- change
RailsStarter
toNewName
- change
package.json
- change
STARTER_REPLACE_NAME
tonew_name
- change
By default we have set this up to use port 3000, but as every rails app uses that port you may conflict with other projects. To update to port 5000 for example, change the following:
docker-compose.yml
- change"3000:3000"
->"5000:3000"
.env.development
- changeAPP_PORT=3000
->APP_PORT=5000
We try to keep the base repository up to date, but when you pull it's worth looking into whether you need to upgrade rails. A guide can be found on the rails website.
As of Rails 5.1, the upgrade process should be as simple as:
- Update the
rails
gem inGemfile
- Run
bundle install
- Run
rails app:update
for an interactive upgrade
There are a number of gems that need configuration to work:
- Configure
simple_form
- Ensure columns for
discard
- http://www.betterspecs.org/
- https://github.com/ankane/production_rails
- https://github.com/ankane/secure_rails
- https://robots.thoughtbot.com/its-about-time-zones
If you look in docker-compose.yml
you'll notice that we've spun up a number of containers, not all of which may be useful for your project.
- web: Your core container which runs the
rails
server process. - worker: A duplicate of your core app, but running
sidekiq
instead. [Disabled by Default] - redis: A
redis
instance forsidekiq
. [Disabled by Default] - localstack:
localstack
is a suite of fake AWS services. [Disabled by Default] - postgres: Your application's database. search for
SWITCH MYSQL
to toggle from Postgres to MySQL - mysql: MySQL DB, disabled by default
- stripe: An officially supported stripe mock. [Disabled by Default]
To cleanup all containers, volumes and networks execute docker-compose down -v
/_dev/letter_opener
- View emails send from the rails application/_dev/sidekiq
- View active jobs and other statistics for Sidekiq
rails_starter
was built by Apsis Labs. We love sharing what we build! Check out our other libraries on Github, and if you like our work you can hire us to build your vision.