this is my dockerfile. environment variables was not recognized.
However, hardcoded environment variables were successfully recognized. like 'DOMAIN' or 'NOTICE_FILE_PATH' were successfully recognized.
MAINTAINER JeongWooYeong(wjd030811@gmail.com)
ENV SECRET_KEY_BASE $SECRET_KEY_BASE
ENV SCARFS_PASSWORD $SCARFS_PASSWORD
ENV API_KEY $API_KEY
ENV DOMAIN dsm-scarfs.hs.kr
ENV NOTICE_FILE_PATH /home/ubuntu/scarfs/storage/notice_file
ENV EXCEL_FILE_PATH /home/ubuntu/scarfs/storage/excel_file
ENV SINGLE_FILE_PATH /home/ubuntu/scarfs/storage/single_file
ENV MULTI_FILE_PATH /home/ubuntu/scarfs/storage/multi_file
ENV SCARFS_DB $SCARFS_DB
RUN apt-get update && \
apt-get install -y \
default-libmysqlclient-dev \
nodejs
RUN gem install bundler
COPY . .
WORKDIR .
RUN bundle install
EXPOSE 3000
VOLUME [".storage", "/home/ubuntu/T-bone"]
RUN ["bundle", "exec", "unicorn", "-E", "production", "-c", "config/unicorn.rb"]
and it caused the following error:
ArgumentError: `secret_key_base` for production environment must be a type of String`
what can i do?