Git Product home page Git Product logo

d20240117d's Introduction

BaseSource

Table of Contents

Requirements

  • Docker 19.x

If you run the project locally, the followings are required.

  • Ruby 3.0.0
  • Bundler 2.1.x
  • Node.js 14.15.1
  • Yarn 1.22.x
  • Postgres 14.x

Setup

Setup procedure of development environment.

Run cp .env.example .env and open .env file to edit environment variables.

Docker environment

Build docker containers

docker-compose build

Setup database Development

docker-compose run web bundle exec rake db:create db:migrate db:seed

After running seed, there should be a doorkeeper application record in your database. In your rails console, run the following command:

Doorkeeper::Application.last

Copy uid and secret and put them in NextJS project's .env file under corresponding env variables: NEXT_APP_CLIENT_ID and NEXT_APP_CLIENT_SECRET

Setup database Test

docker-compose run web bundle exec rake db:create db:migrate db:seed RAILS_ENV=test

Rswag

docker-compose run web  bundle exec rake rswag:specs:swaggerize

Start the app

docker-compose up

Local environment without Docker

If you want to use Rails without Docker, then follow below steps

Install dependencies

bundle install

Start postgres and setup database

bin/rake db:create db:migrate db:seed

Start the app

## API server
bin/rails s

Start console

bin/rails c

Mail server in development environment

If you install and run rails server on your local machine, email will be open immediately on your browser when an email is sent by rails. If you're using docker, please go to mailbox at http://localhost:1080

Deployment

Once you created the staging and production environments in Jitera's DevOps menu, you can deploy to staging by pushing a new commit to develop branch, and to production by pushing a new commit to master branch.

Supplement

This project was generated by jitera automation, run by Jitera.

d20240117d's People

Contributors

nao215 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.