forked from webdino/gitfab2
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Yuichi Takeuchi edited this page Jul 31, 2018
·
19 revisions
Welcome to the gitfab2 wiki!
bundle exec ridgepole -c config/database.yml -E development --apply --dry-run -f db/schemas/Schemafile --enable-foreigner
bundle exec ridgepole -c config/database.yml -E development --apply -f db/schemas/Schemafile --enable-foreigner
bundle exec ridgepole -c config/database.yml -E test --apply -f db/schemas/Schemafile --enable-foreigner
bundle exec rake tmp:clear
has_many :items, dependent: :destroy
has_one :item, dependent: :destroy
belongs_to :parent
classes = Dir.glob('app/models/*.rb').map{|path| path.to_s.match('.+/(.+?).rb')[1].camelize.constantize}.select{|klass|klass.respond_to?(:reindex)}
classes.each do |klass|
klass.find_each do |obj|
begin
obj.index!
rescue => e
puts "#{obj.class.name}:#{obj.id}: #{e.message}(#{e.class.name})"
end
end
end
docker-compose.yml
version: '3'
volumes:
mysql-data:
driver: 'local'
minio-data:
driver: 'local'
services:
db:
image: mysql:5.6.36
command: '--innodb-file-format=Barracuda --innodb-file-per-table=true --innodb-large-prefix=true'
environment:
MYSQL_USER: root
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_ROOT_HOST: '%'
TZ: /usr/share/zoneinfo/Asia/Tokyo
volumes:
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- mysql-data:/var/lib/mysql
ports:
- '3306:3306'
networks:
- default
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot", "-P", "3306"]
interval: 1m
timeout: 10s
retries: 5
sunspot:
image: rorymc/docker-solr-sunspot
ports:
- '8984:8983'
docker-compose -f docker-compose.yml up
config/sunspot.yml
development:
solr:
hostname: localhost
port: 8984
log_level: INFO
path: /solr/collection1
export GITHUB_APP_ID=xxxxxxxxxxxxxxxxxxxx
export GITHUB_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
direnv allow