mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-04 04:03:25 +08:00
27 lines
866 B
Docker
27 lines
866 B
Docker
FROM registry.cn-hangzhou.aliyuncs.com/gitlink/ruby:2.4.5
|
|
|
|
ADD ./ /home/pdl/gitlink
|
|
|
|
WORKDIR /home/pdl/gitlink
|
|
|
|
RUN /bin/bash -l -c 'gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/'
|
|
|
|
RUN /bin/bash -l -c 'gem update --system'
|
|
|
|
RUN /bin/bash -l -c 'gem install bundler -v 2.3.26'
|
|
RUN /bin/bash -l -c 'gem install rake'
|
|
|
|
RUN rm -rf Gemfile.lock
|
|
|
|
RUN cp config/configuration.yml.example config/configuration.yml
|
|
RUN cp config/database.yml.example config/database.yml
|
|
RUN touch config/redis.yml
|
|
RUN touch config/elasticsearch.yml
|
|
|
|
RUN /bin/bash -l -c 'bundle install'
|
|
RUN /bin/bash -l -c 'RAILS_ENV=production rails db:create'
|
|
RUN /bin/bash -l -c 'RAILS_ENV=production bundle exec rake sync_table_structure:import_csv'
|
|
RUN /bin/bash -l -c 'RAILS_ENV=production rails db:migrate'
|
|
|
|
#EXPOSE 4000
|
|
#RUN /bin/bash -l -c 'RAILS_ENV=production puma' |