• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamephpguicwindows翻訳pythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

Voice data server for navigation voice changer app.


Commit MetaInfo

Revisionea7dcf0f40c53d904e455ca58eb071b5e40b897c (tree)
Time2017-11-11 17:00:12
AuthorHMML <hmml3939@gmai...>
CommiterHMML

Log Message

Update docker deploy setting.

Change Summary

Incremental Difference

--- a/Dockerfile
+++ b/Dockerfile
@@ -1,12 +1,9 @@
1-FROM ruby:latest
1+FROM ruby:2.3
22 ENV DEBIAN_FRONTEND noninteractive
3-RUN apt update
4-RUN apt -y full-upgrade
5-RUN apt -y install file sox libsox-fmt-mp3 libsox-fmt-base
6-RUN apt -y install libsqlite3-dev
7-RUN apt-get clean
3+ENV BUNDLE_APP_CONFIG /app/.bundle
4+ENV BUNDLE_BIN /app/shared/bundle/bin
5+RUN apt update && apt -y full-upgrade && apt -y install file sox libsox-fmt-mp3 libsox-fmt-base libsqlite3-dev && apt-get clean
86 RUN adduser --system --disabled-password --uid 3000 --group --home /app rails
97 RUN gem install bundler --no-rdoc --no-ri
108 ADD runapp /
11-ENV BUNDLE_APP_CONFIG /app/.bundle
129 CMD /runapp
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -16,3 +16,9 @@ namespace :deploy do
1616 after "deploy:assets:precompile", "deploy:fix_asset_perms"
1717 end
1818
19+namespace :docker do
20+ task :build_image do
21+ puts "Trying to build base image..."
22+ system *%W(docker build --tag nvc-base .)
23+ end
24+end
--- a/config/deploy/docker-test.rb
+++ b/config/deploy/docker-test.rb
@@ -17,3 +17,5 @@ server docker: {
1717 }, user: 'rails:rails', roles: %w{web app}
1818
1919 Rake::Task["passenger:restart"].clear
20+
21+before 'deploy:starting', 'docker:build_image'
--- a/config/deploy/docker.rb
+++ b/config/deploy/docker.rb
@@ -1,5 +1,5 @@
11 set :sshkit_backend, SSHKit::Backend::Docker
2-set :stage, :development
2+set :stage, :production
33 set :branch, 'release'
44 set :deploy_to, '/app'
55 fetch(:default_env).merge!(rails_env: :production, RAILS_SERVE_STATIC_FILES: 1,
@@ -16,3 +16,5 @@ server docker: {
1616 }, user: 'rails:rails', roles: %w{web app}
1717
1818 Rake::Task["passenger:restart"].clear
19+
20+before 'deploy:starting', 'docker:build_image'