Files
gitlink-forgeplus/Dockerfile
2023-05-24 17:50:26 +08:00

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'