Webapp with cart, user/admin menu, item search and purchase.
Ruby on rails, React, Bootstrap, Postgresql, Docker, Docker-compose, Nginx;
Before you begin, ensure than you have the following installed:
- Git
- Docker
- Docker Compose
Clone the Repository
git clone https://github.com/DenisYakovlev/e-commerce-shop.git
In backend directory create .env.prod file and put your values:
- PORT - port of application, use 8000 to match nginx config
- POSTGRES_USERNAME - database user
- POSTGRES_PASSWORD - database password
- POSTGRES_HOST - database host, use db to match nginx config
- POSTGRES_PORT - database port, use 5432 to match nginx config
- JWT_SECRET - secret key for encoding/decoding jwt tokens
In frontend directory create .env.prod file and put your values:
- REACT_APP_API_BASE_URL - url of backend server, must be app_url/api/ to match nginx config
Also, go to nginx/nginx.conf if you want to change basic config for proxy server of your application.
You can run production build from root directory with:
docker-compose -f docker-compose.yml up --build