Skip to content
This repository was archived by the owner on Apr 24, 2020. It is now read-only.

Setting up studentsaver in Docker

Noam edited this page Feb 25, 2020 · 20 revisions

Table of Contents

  1. Prerequisite
  2. Installation
  3. Create discount entry
  4. Upvote/downvote coupon
  5. Revert upvote/downvote coupon

Prerequisite

Installation

studentsaver is made out of three components: The backend, The front-end and The database. We recommend to containerize everything so you will need to run three containers in total, one container for each component. As listed in the prerequisite we assume you already have a working mysql container. lets start with the backend container.

Backend container

In the backend folder listed on this github page you will need to configure the dockerfile to meet your specifications. In the dockerfile the "env" are variables that needs to match with your mysql server so

port of your mysql server: env DB_PORT=
ip or hostname of your mysql server: env DB_HOST=
password of you mysql server: env DB_PASSWORD=
username of you mysql server: env DB_USER=
database name of you mysql server: env DB_NAME=

After configuring the dockerfile you can start building it. To start building the docker image you will need to run the following command on you machine where docker engine runs on:

docker build -t ellis .

After building the image you need to run the image as a container. We use port 3000:3000 for all our api traffic but you can change that ofcourse

docker run -p 3000:3000 -e db_host="83.85.220.177" -e db_password="studento7" ellis

Front end container

Clone this wiki locally