A simple E2E ecommerce REST api. For GOTOKO take home test. Author: bondhan.novandy@gmail.com
make
migrate create -ext sql -dir migrations/scripts/ -seq -digits 2 create_table_order_details
migrate -database mysql://root@/ecommerce -path ./migrations/scripts up
migrate -database mysql://root@/ecommerce -path ./migrations/scripts down
mac:
docker run -e API_URL=http://host.docker.internal:3030 -e "MYSQL_HOST=localhost" -e "MYSQL_PORT=3306" -e "MYSQL_USER=root" -e "MYSQL_DBNAME=ecommerce" -p 8080:3030 ecommerce:v1
docker run -e "MYSQL_HOST=host.docker.internal" -e "MYSQL_PORT=3306" -e "MYSQL_USER=root" -e "MYSQL_DBNAME=ecommerce" -p 8080:3030 ecommerce:v1
linux:
docker build --platform linux/amd64 --no-cache -t bono02/ecommerce:v1-linux -f ./Dockerfile .
interactive:
docker run --rm -ti -e "MYSQL_HOST=host.docker.internal" -e "MYSQL_PORT=3306" -e "MYSQL_USER=root" -e "MYSQL_DBNAME=ecommerce" -p 8080:3030 ecommerce:v1 /bin/bash
push:
docker build --platform linux/amd64 --no-cache -t bono02/ecommerce:v1-linux -f ./Dockerfile . && docker push bono02/ecommerce:v1-linux