-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up studentsaver in Docker
- Prerequisite
- Installation
- Create discount entry
- Upvote/downvote coupon
- Revert upvote/downvote coupon
- Docker environment (https://docs.docker.com/install/)
- Mysql database that runs in a container (https://hub.docker.com/_/mysql)
- Network connection between the two containers (the API needs a connection to a database for it to work)
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.
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
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:
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