Giter VIP home page Giter VIP logo

db-syncing's Introduction

db-syncing

This is a project for synchronize data from a database to another database.

Stack

  • Ruby (v3.0.2)
  • Rails (v)
  • MySQL ()

1. Installation

For installation, you will need to follow these step:

  1. Install ruby and rvm
sudo apt install -y gcc gnupg2
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
cd ~
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 3.0.2

Note: If you prefer using rbenv, you can reference to this:

sudo apt install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel

chmod +x ./shell-helper/2-rbenv-install.sh
./shell-helper/2-rbenv-install.sh

For choose the correct path for ruby version, you may need to config the .bashrc by adding the line:

export PATH=~/.rbenv/shims:$PATH
  1. Install mysql client

(Install client only -> can connect to a DB, but cannot host)

sudo apt-get install -y mysql-client libmysqlclient-dev
  1. Clone source code to local

If haven't git, install git:

sudo apt install -y git

Clone source code to local

cd ~
git clone https://github.com/kumcp/db-syncing.git
  1. Install dependencies
cd ~/db-syncing
bundle install
  1. Setup webpack

Before you can run this command, you will need to install node, npm, yarn:

sudo apt install nodejs npm -y
sudo npm install --global yarn

Install webpacker with:

bundle exec rake webpacker:install
  1. If there's no problem installing dependencies, you can run the server with:
rails server -b 127.0.0.1 -p 3000

Note:

  • Change to your local IP (private IP) if you host this on EC2.
  • Change to 0.0.0.0 if want to bind address anywhere.
rails server -b 0.0.0.0 -p 3000

Run with container

If you prefer to run the project as container, following this command:

docker-compose up

docker-compose up --build  # If you change anything in Dockerfile and want to rebuild all

docker-compose up --build <service_name> # If you want to rebuild only web sevice

docker-compose up -d --no-deps --build <service_name> # If you don't want to rebuil link services

db-syncing's People

Contributors

kumcp avatar quanhoang288 avatar thachnv92 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.