Skip to content

Commit bad6e95

Browse files
committed
rails files.
1 parent 73432ff commit bad6e95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1259
-1
lines changed

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
2+
3+
# Mark the database schema as having been generated.
4+
db/schema.rb linguist-generated
5+
6+
# Mark any vendored files as having been vendored.
7+
vendor/* linguist-vendored

.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
*.rbc
2+
capybara-*.html
3+
.rspec
4+
/db/*.sqlite3
5+
/db/*.sqlite3-journal
6+
/db/*.sqlite3-[0-9]*
7+
/public/system
8+
/coverage/
9+
/spec/tmp
10+
*.orig
11+
rerun.txt
12+
pickle-email-*.html
13+
14+
# Ignore all logfiles and tempfiles.
15+
/log/*
16+
/tmp/*
17+
!/log/.keep
18+
!/tmp/.keep
19+
20+
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
21+
config/initializers/secret_token.rb
22+
config/master.key
23+
24+
# Only include if you have production secrets in this file, which is no longer a Rails default
25+
# config/secrets.yml
26+
27+
# dotenv, dotenv-rails
28+
# TODO Comment out these rules if environment variables can be committed
29+
.env
30+
.env*.local
31+
32+
## Environment normalization:
33+
/.bundle
34+
/vendor/bundle
35+
36+
# these should all be checked in to normalize the environment:
37+
# Gemfile.lock, .ruby-version, .ruby-gemset
38+
39+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
40+
.rvmrc
41+
42+
# if using bower-rails ignore default bower_components path bower.json files
43+
/vendor/assets/bower_components
44+
*.bowerrc
45+
bower.json
46+
47+
# Ignore pow environment settings
48+
.powenv
49+
50+
# Ignore Byebug command history file.
51+
.byebug_history
52+
53+
# Ignore node_modules
54+
node_modules/
55+
56+
# Ignore precompiled javascript packs
57+
/public/packs
58+
/public/packs-test
59+
/public/assets
60+
61+
# Ignore yarn files
62+
/yarn-error.log
63+
yarn-debug.log*
64+
.yarn-integrity
65+
66+
# Ignore uploaded files in development
67+
/storage/*
68+
!/storage/.keep
69+
/public/uploads

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby-3.2.2

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM ruby:3.2.2
2+
3+
RUN apt-get update -qq && apt-get install -y nodejs default-libmysqlclient-dev
4+
5+
WORKDIR /app
6+
7+
COPY Gemfile* /app/
8+
RUN gem install bundler && bundle install
9+
COPY . /app
10+
11+
COPY entrypoint.sh /usr/bin/
12+
RUN chmod +x /usr/bin/entrypoint.sh
13+
ENTRYPOINT ["entrypoint.sh"]
14+
EXPOSE 3000
15+
16+
CMD ["rails", "server", "-b", "0.0.0.0"]

Gemfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
source "https://rubygems.org"
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3+
4+
ruby "3.2.2"
5+
6+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7+
gem "rails", "~> 7.0.7"
8+
9+
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
10+
gem "sprockets-rails"
11+
12+
# Use mysql as the database for Active Record
13+
gem "mysql2", "~> 0.5"
14+
15+
# Use the Puma web server [https://github.com/puma/puma]
16+
gem "puma", "~> 5.0"
17+
18+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
19+
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
20+
21+
group :development, :test do
22+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
23+
gem "debug", platforms: %i[ mri mingw x64_mingw ]
24+
end
25+
26+
group :development do
27+
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
28+
# gem "spring"
29+
end
30+

Gemfile.lock

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actioncable (7.0.7)
5+
actionpack (= 7.0.7)
6+
activesupport (= 7.0.7)
7+
nio4r (~> 2.0)
8+
websocket-driver (>= 0.6.1)
9+
actionmailbox (7.0.7)
10+
actionpack (= 7.0.7)
11+
activejob (= 7.0.7)
12+
activerecord (= 7.0.7)
13+
activestorage (= 7.0.7)
14+
activesupport (= 7.0.7)
15+
mail (>= 2.7.1)
16+
net-imap
17+
net-pop
18+
net-smtp
19+
actionmailer (7.0.7)
20+
actionpack (= 7.0.7)
21+
actionview (= 7.0.7)
22+
activejob (= 7.0.7)
23+
activesupport (= 7.0.7)
24+
mail (~> 2.5, >= 2.5.4)
25+
net-imap
26+
net-pop
27+
net-smtp
28+
rails-dom-testing (~> 2.0)
29+
actionpack (7.0.7)
30+
actionview (= 7.0.7)
31+
activesupport (= 7.0.7)
32+
rack (~> 2.0, >= 2.2.4)
33+
rack-test (>= 0.6.3)
34+
rails-dom-testing (~> 2.0)
35+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
36+
actiontext (7.0.7)
37+
actionpack (= 7.0.7)
38+
activerecord (= 7.0.7)
39+
activestorage (= 7.0.7)
40+
activesupport (= 7.0.7)
41+
globalid (>= 0.6.0)
42+
nokogiri (>= 1.8.5)
43+
actionview (7.0.7)
44+
activesupport (= 7.0.7)
45+
builder (~> 3.1)
46+
erubi (~> 1.4)
47+
rails-dom-testing (~> 2.0)
48+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
49+
activejob (7.0.7)
50+
activesupport (= 7.0.7)
51+
globalid (>= 0.3.6)
52+
activemodel (7.0.7)
53+
activesupport (= 7.0.7)
54+
activerecord (7.0.7)
55+
activemodel (= 7.0.7)
56+
activesupport (= 7.0.7)
57+
activestorage (7.0.7)
58+
actionpack (= 7.0.7)
59+
activejob (= 7.0.7)
60+
activerecord (= 7.0.7)
61+
activesupport (= 7.0.7)
62+
marcel (~> 1.0)
63+
mini_mime (>= 1.1.0)
64+
activesupport (7.0.7)
65+
concurrent-ruby (~> 1.0, >= 1.0.2)
66+
i18n (>= 1.6, < 2)
67+
minitest (>= 5.1)
68+
tzinfo (~> 2.0)
69+
builder (3.2.4)
70+
concurrent-ruby (1.2.2)
71+
crass (1.0.6)
72+
date (3.3.3)
73+
debug (1.8.0)
74+
irb (>= 1.5.0)
75+
reline (>= 0.3.1)
76+
erubi (1.12.0)
77+
globalid (1.1.0)
78+
activesupport (>= 5.0)
79+
i18n (1.14.1)
80+
concurrent-ruby (~> 1.0)
81+
io-console (0.6.0)
82+
irb (1.7.4)
83+
reline (>= 0.3.6)
84+
loofah (2.21.3)
85+
crass (~> 1.0.2)
86+
nokogiri (>= 1.12.0)
87+
mail (2.8.1)
88+
mini_mime (>= 0.1.1)
89+
net-imap
90+
net-pop
91+
net-smtp
92+
marcel (1.0.2)
93+
method_source (1.0.0)
94+
mini_mime (1.1.5)
95+
minitest (5.19.0)
96+
mysql2 (0.5.5)
97+
net-imap (0.3.7)
98+
date
99+
net-protocol
100+
net-pop (0.1.2)
101+
net-protocol
102+
net-protocol (0.2.1)
103+
timeout
104+
net-smtp (0.3.3)
105+
net-protocol
106+
nio4r (2.5.9)
107+
nokogiri (1.15.4-aarch64-linux)
108+
racc (~> 1.4)
109+
puma (5.6.6)
110+
nio4r (~> 2.0)
111+
racc (1.7.1)
112+
rack (2.2.8)
113+
rack-test (2.1.0)
114+
rack (>= 1.3)
115+
rails (7.0.7)
116+
actioncable (= 7.0.7)
117+
actionmailbox (= 7.0.7)
118+
actionmailer (= 7.0.7)
119+
actionpack (= 7.0.7)
120+
actiontext (= 7.0.7)
121+
actionview (= 7.0.7)
122+
activejob (= 7.0.7)
123+
activemodel (= 7.0.7)
124+
activerecord (= 7.0.7)
125+
activestorage (= 7.0.7)
126+
activesupport (= 7.0.7)
127+
bundler (>= 1.15.0)
128+
railties (= 7.0.7)
129+
rails-dom-testing (2.2.0)
130+
activesupport (>= 5.0.0)
131+
minitest
132+
nokogiri (>= 1.6)
133+
rails-html-sanitizer (1.6.0)
134+
loofah (~> 2.21)
135+
nokogiri (~> 1.14)
136+
railties (7.0.7)
137+
actionpack (= 7.0.7)
138+
activesupport (= 7.0.7)
139+
method_source
140+
rake (>= 12.2)
141+
thor (~> 1.0)
142+
zeitwerk (~> 2.5)
143+
rake (13.0.6)
144+
reline (0.3.7)
145+
io-console (~> 0.5)
146+
sprockets (4.2.0)
147+
concurrent-ruby (~> 1.0)
148+
rack (>= 2.2.4, < 4)
149+
sprockets-rails (3.4.2)
150+
actionpack (>= 5.2)
151+
activesupport (>= 5.2)
152+
sprockets (>= 3.0.0)
153+
thor (1.2.2)
154+
timeout (0.4.0)
155+
tzinfo (2.0.6)
156+
concurrent-ruby (~> 1.0)
157+
websocket-driver (0.7.6)
158+
websocket-extensions (>= 0.1.0)
159+
websocket-extensions (0.1.5)
160+
zeitwerk (2.6.11)
161+
162+
PLATFORMS
163+
aarch64-linux
164+
165+
DEPENDENCIES
166+
debug
167+
mysql2 (~> 0.5)
168+
puma (~> 5.0)
169+
rails (~> 7.0.7)
170+
sprockets-rails
171+
tzinfo-data
172+
173+
RUBY VERSION
174+
ruby 3.2.2p53
175+
176+
BUNDLED WITH
177+
2.4.18

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,50 @@
1-
# light-docker-rails
1+
2+
<div align="center">
3+
<img width="586" alt="スクリーンショット 2023-08-18 10 47 04" src="https://github.com/fooramu/docker-rails-quickly/assets/434513/94cd06e1-27d7-4b4a-9941-f392e730f966">
4+
</div>
5+
6+
# docker-rails-quickly
7+
8+
### You can check Rails7 very quickly.
9+
10+
- We don't have to occurred any more errors to check for Rails behavior.
11+
- We don't have to Initial setup after git clone.
12+
- We don't have to read long README.
13+
- We don't have to start up mysterious containers.
14+
15+
### Containers
16+
17+
Name | Description | ※
18+
--- | --- | ---
19+
db | MySQL 8 | Health check available (linked to `web`)
20+
web | ruby 3.2.2, Rails 7.0.7 | `rails new --force --no-deps --database=mysql --minimal`
21+
22+
We will continue to update to the latest version whenever possible.
23+
24+
## How it works
25+
26+
```bash
27+
git clone [email protected]:fooramu/docker-rails-quickly.git
28+
cd docker-rails-quickly
29+
docker compose build
30+
docker compose up -d
31+
docker compose exec web rails db:create
32+
```
33+
34+
## Goal
35+
36+
<img width="500" alt="スクリーンショット 2023-08-18 16 34 26" src="https://github.com/fooramu/docker-rails-quickly/assets/434513/8f5bedde-e384-42af-8eeb-04808389ee2a">
37+
38+
## How to contribute
39+
40+
If you have a more shortly construct ideas, please `fork`.
41+
Thank you for all Rails engineer's.
42+
43+
1. Fork the repo
44+
2. Create a new branch
45+
3. Make your changes
46+
4. Submit a pull request
47+
48+
## License
49+
50+
This project is licensed under the MIT open source license.

Rakefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3+
4+
require_relative "config/application"
5+
6+
Rails.application.load_tasks

app/assets/config/manifest.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//= link_tree ../images
2+
//= link_directory ../stylesheets .css

app/assets/images/.keep

Whitespace-only changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* This is a manifest file that'll be compiled into application.css, which will include all the files
3+
* listed below.
4+
*
5+
* Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
7+
*
8+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
9+
* compiled file so the styles you add here take precedence over styles defined in any other CSS
10+
* files in this directory. Styles in this file should be added after the last require_* statement.
11+
* It is generally better to create a new file per style scope.
12+
*
13+
*= require_tree .
14+
*= require_self
15+
*/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class ApplicationController < ActionController::Base
2+
end

app/controllers/concerns/.keep

Whitespace-only changes.

app/helpers/application_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module ApplicationHelper
2+
end

app/models/application_record.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class ApplicationRecord < ActiveRecord::Base
2+
primary_abstract_class
3+
end

app/models/concerns/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)