Skip to content

Latest commit

 

History

History
79 lines (60 loc) · 1.59 KB

README.md

File metadata and controls

79 lines (60 loc) · 1.59 KB

Basic App Development

Ecommerce workflow sederhana, handle order dan payment page.

Feature

  • Order Service
    • Checkout
      • register to payment service
      • store and locking items
      • redirect to payment service page
    • Placed
      • update order to order placed
  • Payment Service
    • Register Payment
      • store and locking items
    • Payment Page
      • choose payment type
      • simulating payment process
  • Account Service
    • Register
      • Create Account
    • Login
      • Return token
  • Catalog Service

Running

docker-compose build
docker-compose up

# run specific container
docker-compose up -d --no-deps --build order

Dependencies

Migrate

Run postgre on docker

docker run \
  -d \
  -e POSTGRES_HOST_AUTH_METHOD=trust \
  -e POSTGRES_USER=root \
  -e POSTGRES_PASSWORD=root \
  -e POSTGRES_DB=commerce \
  -p 5432:5432 \
  --name commercedb \
  postgres:12.5-alpine

Export Variable

export POSTGRESQL_URL='postgres://sa:zcommerce@localhost:5432/commerce?sslmode=disable'

Create migrations

migrate create -ext sql -dir db/migrations/schemas -seq create_order_table

Run Migrations

migrate -database ${POSTGRESQL_URL} -path db/migrations/schemas up