This repo is the API server of GoPlan, this API server is to serve content to the GoPlan Web client. You can find the GoPlan Web client repo here.
bundle install
cp .env.development.example .env
- Modify
.env
to suit your local development preferences bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:seed
bundle exec rails s -p [PORT]
This will run the server in the development mode with the port you specify.
- Go to OAuth applications page, e.g. http://localhost:8000/oauth/applications with initial admin username & password found in
db/seed.rb
- Create a new application with the information defined in the corresponding GoPlan Web env file, e.g.:
- Name: GoPlan Web
- Redirect URI: http://localhost:3000/callback
- Confidential: uncheck
- Scopes: write
- Copy the application UID and save it as REACT_APP_CLIENT_ID in the corresponding GoPlan Web env file
- Start GoPlan Web server, login or sign up then start using GoPlan!
cp .env.production.example .env
- Modify
.env
to suit your docker deployment preferences sudo docker compose build
sudo docker compose up
sudo docker exec <container> /bin/bash -c 'bundle exec rake db:create'
sudo docker exec <container> /bin/bash -c 'bundle exec rake db:migrate'
sudo docker exec <container> /bin/bash -c 'bundle exec rake db:seed'
Please note, in production, AdminUser won't be created automatically for security reasons. You need to manually create a AdminUser in Rails console with the following commands:
sudo docker exec -it <container> /bin/bash -c 'bundle exec rails c'
AdminUser.create!(email: '[email protected]', password: 'password', password_confirmation: 'password')
Now, you can finish the steps in "Additional setup steps after server is run" section.
bundle exec rspec