Skip to content

oyvsyo/rentBestCar

Repository files navigation

DEV:

  1. Install vagrant: sudo apt-get install virtualbox sudo apt-get install vagrant

  2. Сlone project from git: [email protected]:knowledge-point/scheduling_1_8.git

  3. In DIR: scheduling/ run: vagrant up

  4. Enter in box: vagrant ssh

  5. Set All env variables : { RUN_ENV=DEV, RABBITMQ_DEFAULT_USER=..., RABBITMQ_DEFAULT_PASS=..., }

  6. In vagrant box run:

  • cd /vagrant
  • sh redeploy.sh
  1. Create volume for DB:
  • docker exec -it scheduling_postgres_dev_1 /bin/bash
  • su postgres
  • psql
  • CREATE DATABASE scheduling_dev;
  • CREATE USER scheduling_dev PASSWORD 'scheduling_dev';
  • GRANT ALL PRIVILEGES ON DATABASE scheduling_dev TO scheduling_dev;
  • \q
  • exit
  • exit
  • sh redeploy.sh
  1. In browser open http://127.0.0.1/

PROD:

  1. Install docker & docker-compose:
  • sudo -i
  • echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
  • curl -sSL https://get.docker.com/ | sh
  • usermod -aG docker ubuntu
  • curl -L https://github.com/docker/compose/releases/download/1.5.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
  • chmod +x /usr/local/bin/docker-compose
  1. Сlone project from git: git clone https://github.com/knowledge-point/scheduling_1_8.git
  2. Set All env variables on server: { RUN_ENV=PROD, DB_HOST=..., SCHEDUL_DB_PASS=..., SCHEDUL_DB_HOST=..., SCHEDUL_SENTRY_URL=..., RABBITMQ_DEFAULT_USER=..., RABBITMQ_DEFAULT_PASS=..., RABBITMQ_HOST=..., }
  3. In DIR: /project run: sh redeploy.sh

STAGE | TEST:

  1. Install docker & docker-compose:
  • sudo -i
  • echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
  • curl -sSL https://get.docker.com/ | sh
  • usermod -aG docker ubuntu
  • curl -L https://github.com/docker/compose/releases/download/1.5.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
  • chmod +x /usr/local/bin/docker-compose
  1. Сlone project from git: git clone https://github.com/knowledge-point/scheduling_1_8.git
  2. Set All env variables on server: { RUN_ENV=STAGE | TEST(choose one), SCHEDUL_SENTRY_URL=..., RABBITMQ_DEFAULT_USER=..., RABBITMQ_DEFAULT_PASS=..., }
  3. In DIR: /project run:
  • sh redeploy.sh [stage|test] (choose one)
  1. Create volume for DB:
  • docker exec -it scheduling_postgres_[stage|test]_1 /bin/bash (choose one)
  • su postgres
  • psql
  • CREATE DATABASE scheduling_[stage|test]; (choose one)
  • CREATE USER scheduling_[stage|test] PASSWORD 'scheduling_[stage|test]'; (choose one)
  • GRANT ALL PRIVILEGES ON DATABASE scheduling_[stage|test] TO scheduling_[stage|test]; (choose one)
  • \q
  • exit
  • exit
  • sh redeploy.sh
  • sh redeploy.sh [stage|test] (choose one)

API REST (need import to Postman):

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •