Skip to content

Instantly share code, notes, and snippets.

@matsubo
Created December 13, 2022 16:13
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 matsubo/84739e4f62b8881597d85f3a8f8d6b7e to your computer and use it in GitHub Desktop.
Save matsubo/84739e4f62b8881597d85f3a8f8d6b7e to your computer and use it in GitHub Desktop.
rails 7 first step
version: '3'
services:
app:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/app
ports:
- "3000:3000"
volumes:
- .:/app
- bundle_app:/usr/local/bundle:cached
volumes:
bundle_app:
driver: local
FROM ruby:3
RUN mkdir /app
WORKDIR /app
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundle install
ADD . /app
# frozen_string_literal: true
source "https://rubygems.org"
gem "rails", "~> 7.0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment