Oblyk is an open-source community website dedicated to climbing. It aims to build a large open-data database of cliffs, routes and climbing gyms in France and around the world that can be freely consulted via an API. Climbers can also use this tool to rate their crosses or find climbing partners.
This repository is the API part of the Oblyk project.
For the front app, go here: oblyk-app
- ruby 3.4.10 (Use Rbenv to manage Ruby versions)
- bundle >= 2.0.0
- docker >= 20.10
- docker-compose >= 1.2
- vips >= 8.13
# Clone project
git clone git@github.com:oblyk/oblyk-api.git
# Go to project folder
cd oblyk-api
# Install gem
bundle
# Copy example local_env.yml
cp config/local_env.example.yml config/local_env.yml
# Up docker
docker compose up -d
# Create oblyk_development database
bundle exec rails db:setupbundle exec rails sGo to localhost:3000
Enjoy!
First open rails console
bundle exec rails cEnd create your organization
my_organization = Organization.new name: 'My Awesome Organization', email: 'my@email.com', api_usage_type: 'personal'
my_organization.save
my_organization.api_access_token
# => vvPpFZhg...
# You can use this token in HttpApiAccessToken headerSidekiq si job system, start it to unstack the background tasks
bundle exec sidekiqGo to localhost:3000 to see the monitor.
Sidekiq user and password is configured in config/local_env.yml
In a Rails console rails c
[GuideBookPaper, Area, Gym, Word, User].each do |klass|
klass.ms_reindex!
end
Crag.includes(:areas).ms_reindex!
CragRoute.joins(:crag, :crag_sector).includes(:crag, :crag_sector).ms_reindex!
Town.includes(:department).ms_reindex!