Voice data server for navigation voice changer app.
Revision | ea7dcf0f40c53d904e455ca58eb071b5e40b897c (tree) |
---|---|
Time | 2017-11-11 17:00:12 |
Author | HMML <hmml3939@gmai...> |
Commiter | HMML |
Update docker deploy setting.
@@ -1,12 +1,9 @@ | ||
1 | -FROM ruby:latest | |
1 | +FROM ruby:2.3 | |
2 | 2 | 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 | |
8 | 6 | RUN adduser --system --disabled-password --uid 3000 --group --home /app rails |
9 | 7 | RUN gem install bundler --no-rdoc --no-ri |
10 | 8 | ADD runapp / |
11 | -ENV BUNDLE_APP_CONFIG /app/.bundle | |
12 | 9 | CMD /runapp |
@@ -16,3 +16,9 @@ namespace :deploy do | ||
16 | 16 | after "deploy:assets:precompile", "deploy:fix_asset_perms" |
17 | 17 | end |
18 | 18 | |
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 |
@@ -17,3 +17,5 @@ server docker: { | ||
17 | 17 | }, user: 'rails:rails', roles: %w{web app} |
18 | 18 | |
19 | 19 | Rake::Task["passenger:restart"].clear |
20 | + | |
21 | +before 'deploy:starting', 'docker:build_image' |
@@ -1,5 +1,5 @@ | ||
1 | 1 | set :sshkit_backend, SSHKit::Backend::Docker |
2 | -set :stage, :development | |
2 | +set :stage, :production | |
3 | 3 | set :branch, 'release' |
4 | 4 | set :deploy_to, '/app' |
5 | 5 | fetch(:default_env).merge!(rails_env: :production, RAILS_SERVE_STATIC_FILES: 1, |
@@ -16,3 +16,5 @@ server docker: { | ||
16 | 16 | }, user: 'rails:rails', roles: %w{web app} |
17 | 17 | |
18 | 18 | Rake::Task["passenger:restart"].clear |
19 | + | |
20 | +before 'deploy:starting', 'docker:build_image' |