- Phi Luu (philectron)
- Khuong Luu (khashf)
- Aidan Grimshaw (thegrims)
- Clone this repository
- Create a file named
.env
with the following environment variables (fill in the value yourself):
MYSQL_DATABASE
MYSQL_USER
MYSQL_PASSWORD
MONGO_DATABASE
MONGO_ROOT_USER
MONGO_ROOT_PASSWORD
MONGO_USER
MONGO_PASSWORD
MAX_REQUESTS_PER_TIME_WINDOW
TIME_WINDOW_MILLISEC
PAGINATION_PAGE_SIZE
LIMIT_REQUEST_RATE
JWT_SECRET_KEY
MAX_REQUESTS_PER_TIME_WINDOW
,TIME_WINDOW_MILLISEC
,LIMIT_REQUEST_RATE
are used to config rate limiting feature, defining how many request per time window and how long is the time window, and if this feature is to be enabled or not, respectively.PAGINATION_PAGE_SIZE
configures how many return items per page for requests that needs paginationJWT_SECRET_KEY
is your secret key for JWT
- Run
./compose.sh
Use compose.sh
script file in the root directory of this project
./compose.sh
Use sudo chmod +x ./compose.sh
if permission to execute the script is denied
Stops all the containers that were brought up by earlier up command. This is usually helpful when you forgot to stop containers that somehow ended up causing the problem.
docker-compose stop
Like above, but also remove those containers
docker-compose down
Kill all docker containers. This is helpful for cleaning up remnants of previous assignments
docker kill $(docker ps -q)
Rebuilds all images, including MySQL
docker-compose build
Creates containers that aren't created yet, starts them if they have been created -d
detaches terminal so you can use it again
docker-compose up -d
Ultimate fix: Stops and removes everything (including volumes), then builds from scratch, and then starts (sudo
every command if needed)
docker-compose down -v && docker-compose build && docker-compose up
Desperate fix: (don't do this if you have other Docker projects running) Quits all Docker processes, deletes all containers and images, and starts from a clean slate
docker kill $(docker ps -q); docker system prune -af; docker-compose up