Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-composeの追加 #34

Merged
merged 4 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion portal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RUN NODE_ENV=production node_modules/.bin/webpack
# https://github.com/sorah-rbpkg/dockerfiles
FROM sorah/ruby:2.7-dev as builder

RUN rm /etc/apt/sources.list.d/sorah-ruby.list

RUN apt-get update \
&& apt-get install -y libmysqlclient-dev libsodium-dev git-core \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -27,6 +29,8 @@ RUN bundle install --path /gems --jobs 2 --deployment --without development:test

FROM sorah/ruby:2.7

RUN rm /etc/apt/sources.list.d/sorah-ruby.list

RUN apt-get update \
&& apt-get install -y libmysqlclient21 libsodium23 libsodium-dev \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -43,4 +47,3 @@ ENV RAILS_SERVE_STATIC_FILES 1
ENV RAILS_SERVE_STATIC_FILES_CC public,max-age=31536000
ENV PORT 3000
CMD ["bundle", "exec", "puma", "-C", "/etc/puma.rb"]

140 changes: 70 additions & 70 deletions portal/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,59 +24,59 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.3.2)
actionpack (= 6.0.3.2)
actioncable (6.0.3.7)
actionpack (= 6.0.3.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.3.2)
actionpack (= 6.0.3.2)
activejob (= 6.0.3.2)
activerecord (= 6.0.3.2)
activestorage (= 6.0.3.2)
activesupport (= 6.0.3.2)
actionmailbox (6.0.3.7)
actionpack (= 6.0.3.7)
activejob (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (= 6.0.3.7)
activesupport (= 6.0.3.7)
mail (>= 2.7.1)
actionmailer (6.0.3.2)
actionpack (= 6.0.3.2)
actionview (= 6.0.3.2)
activejob (= 6.0.3.2)
actionmailer (6.0.3.7)
actionpack (= 6.0.3.7)
actionview (= 6.0.3.7)
activejob (= 6.0.3.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.3.2)
actionview (= 6.0.3.2)
activesupport (= 6.0.3.2)
actionpack (6.0.3.7)
actionview (= 6.0.3.7)
activesupport (= 6.0.3.7)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.3.2)
actionpack (= 6.0.3.2)
activerecord (= 6.0.3.2)
activestorage (= 6.0.3.2)
activesupport (= 6.0.3.2)
actiontext (6.0.3.7)
actionpack (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (= 6.0.3.7)
activesupport (= 6.0.3.7)
nokogiri (>= 1.8.5)
actionview (6.0.3.2)
activesupport (= 6.0.3.2)
actionview (6.0.3.7)
activesupport (= 6.0.3.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_record_mysql_xverify (0.2.2)
activerecord
mysql2
activejob (6.0.3.2)
activesupport (= 6.0.3.2)
activejob (6.0.3.7)
activesupport (= 6.0.3.7)
globalid (>= 0.3.6)
activemodel (6.0.3.2)
activesupport (= 6.0.3.2)
activerecord (6.0.3.2)
activemodel (= 6.0.3.2)
activesupport (= 6.0.3.2)
activestorage (6.0.3.2)
actionpack (= 6.0.3.2)
activejob (= 6.0.3.2)
activerecord (= 6.0.3.2)
marcel (~> 0.3.1)
activesupport (6.0.3.2)
activemodel (6.0.3.7)
activesupport (= 6.0.3.7)
activerecord (6.0.3.7)
activemodel (= 6.0.3.7)
activesupport (= 6.0.3.7)
activestorage (6.0.3.7)
actionpack (= 6.0.3.7)
activejob (= 6.0.3.7)
activerecord (= 6.0.3.7)
marcel (~> 1.0.0)
activesupport (6.0.3.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand All @@ -100,14 +100,14 @@ GEM
rails (>= 4.0.0)
sentry-raven
builder (3.2.4)
concurrent-ruby (1.1.6)
concurrent-ruby (1.1.8)
crass (1.0.6)
diff-lcs (1.4.3)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
ds9 (1.4.1)
mini_portile2 (>= 2.2.0)
erubi (1.9.0)
erubi (1.10.0)
event_emitter (0.2.6)
factory_bot (6.1.0)
activesupport (>= 5.0.0)
Expand Down Expand Up @@ -136,34 +136,33 @@ GEM
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (1.8.3)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jmespath (1.4.0)
jwt (2.2.1)
loofah (2.6.0)
loofah (2.9.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
marcel (1.0.1)
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.0512)
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.1)
mini_mime (1.1.0)
mini_portile2 (2.5.1)
minitest (5.14.4)
multi_json (1.14.1)
multi_xml (0.6.0)
multipart-post (2.1.1)
mysql2 (0.5.3)
netrc (0.11.0)
newrelic_rpm (6.12.0.367)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
nio4r (2.5.7)
nokogiri (1.11.5)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
oauth2 (1.4.4)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
Expand All @@ -190,37 +189,38 @@ GEM
public_suffix (4.0.5)
puma (4.3.5)
nio4r (~> 2.0)
racc (1.5.2)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-timeout (0.6.0)
rails (6.0.3.2)
actioncable (= 6.0.3.2)
actionmailbox (= 6.0.3.2)
actionmailer (= 6.0.3.2)
actionpack (= 6.0.3.2)
actiontext (= 6.0.3.2)
actionview (= 6.0.3.2)
activejob (= 6.0.3.2)
activemodel (= 6.0.3.2)
activerecord (= 6.0.3.2)
activestorage (= 6.0.3.2)
activesupport (= 6.0.3.2)
rails (6.0.3.7)
actioncable (= 6.0.3.7)
actionmailbox (= 6.0.3.7)
actionmailer (= 6.0.3.7)
actionpack (= 6.0.3.7)
actiontext (= 6.0.3.7)
actionview (= 6.0.3.7)
activejob (= 6.0.3.7)
activemodel (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (= 6.0.3.7)
activesupport (= 6.0.3.7)
bundler (>= 1.3.0)
railties (= 6.0.3.2)
railties (= 6.0.3.7)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (6.0.3.2)
actionpack (= 6.0.3.2)
activesupport (= 6.0.3.2)
railties (6.0.3.7)
actionpack (= 6.0.3.7)
activesupport (= 6.0.3.7)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (13.0.1)
rake (13.0.3)
redis (4.2.1)
redis-actionpack (5.2.0)
actionpack (>= 5, < 7)
Expand Down Expand Up @@ -276,13 +276,13 @@ GEM
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (1.0.1)
thor (1.1.0)
thread_safe (0.3.6)
tzinfo (1.2.7)
tzinfo (1.2.9)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
Expand All @@ -294,10 +294,10 @@ GEM
websocket-client-simple (0.3.0)
event_emitter
websocket
websocket-driver (0.7.2)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.3.1)
zeitwerk (2.4.2)

PLATFORMS
ruby
Expand Down
52 changes: 52 additions & 0 deletions portal/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: '3'

services:
app:
build: .
environment:
RACK_ENV: development
RAILS_ENV: development
DATABASE_URL: 'mysql2://isuxportal_dev@mysql/isuxportal_dev?encoding=utf8mb4&charset=utf8mb4&collation=utf8mb4_general_ci'
DATABASE_PASSWORD: dbpass
REDIS_URL: 'redis://redis:6379'
ISUXPORTAL_TIMING_REGISTRATION_OPEN: '2021-06-01T09:00:00Z'
ISUXPORTAL_TIMING_REGISTRATION_CLOSE: '2021-06-31T09:00:00Z'
ISUXPORTAL_TIMING_REGISTRATION_INVITATION_CLOSE: '2021-06-31T09:00:00Z'
ISUXPORTAL_TIMING_REGISTRATION_UPDATE_CLOSE: '2021-06-31T09:00:00Z'
ISUXPORTAL_TIMING_CONTEST_START: '2021-07-14T09:00:00Z'
ISUXPORTAL_TIMING_CONTEST_FREEZE: '2021-07-14T18:00:00Z'
ISUXPORTAL_TIMING_CONTEST_END: '2021-07-14T19:00:00Z'
ISUXPORTAL_GITHUB_CLIENT_ID:
ISUXPORTAL_GITHUB_CLIENT_SECRET:
ISUXPORTAL_DISCORD_CLIENT_ID:
ISUXPORTAL_DISCORD_CLIENT_SECRET:
ISUXPORTAL_DISCORD_BOT_TOKEN:
ISUXPORTAL_DISCORD_SERVER_ID:
ISUXPORTAL_DISCORD_CHANNEL_ID:
ISUXPORTAL_DISCORD_CONTESTANT_ROLE_ID:
ISUXPORTAL_DISCORD_ADMIN_ROLE_ID:
ISUXPORTAL_DISCORD_CONTESTANT_FINAL_ROLE_ID:
ISUXPORTAL_DISCORD_CONTESTANT_FINAL_ROLE:
ISUXPORTAL_DISCORD_CONTESTANT_QUALIFY_ROLE_ID:
ISUXPORTAL_DISCORD_CONTESTANT_QUALIFY_ROLE:
ISUXPORTAL_DISCORD_SUPPORT_COMM_CHANNEL_ROLES:
ISUXPORTAL_ADMIN_LOGIN: admin
ISUXPORTAL_ADMIN_PASSWORD: pass
ports:
- '3000:3000'

redis:
image: redis:latest
expose:
- '6379'

mysql:
image: mysql:latest
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
environment:
MYSQL_ROOT_PASSWORD: passsss
MYSQL_USER: isuxportal_dev
MYSQL_PASSWORD: dbpass
MYSQL_DATABASE: isuxportal_dev
expose:
- '3306'