就像问题陈述一样,有没有办法让所有3个环境都知道这个秘密而不需要像这样复制和粘贴?
secrets.yml
development:
secret_key_base: ...
my_global_secret: foo
test:
secret_key_base: ...
my_global_secret: foo
production:
secret_key_base: ...
my_global_secret: foo
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用带有rails的docker,在一个容器内构建一个完整的堆栈.我的结论是使用runit作为进程管理器的nginx/memcached/unicorn/rails/postgres堆栈.到目前为止,我安装了我的app,ruby和postgres.此时我正在尝试测试一切是否正常工作,然后再继续使用nginx/memcached/unicorn.
这是我的dockerfile:
FROM ubuntu:trusty
ADD . /app
# Update repos
RUN apt-get update
# General
RUN apt-get install -y git curl software-properties-common python-software-properties ssh
# Install ruby (taken from https://gist.github.com/konklone/6662393)
RUN \curl -Lk https://get.rvm.io | bash -s stable
RUN /bin/bash -l -c "rvm requirements"
RUN /bin/bash -l -c "rvm install 2.1.1"
ENV PATH /usr/local/rvm/gems/ruby-2.1.1/bin:/usr/local/rvm/rubies/ruby-2.1.1/bin:$PATH
RUN gem install bundler --no-ri --no-rdoc
# Install nodejs (rails js runtime)
RUN apt-get install -y nodejs
# Install postgresql (adapted from https://wiki.postgresql.org/wiki/Apt)
RUN echo "deb …Run Code Online (Sandbox Code Playgroud)