Giter Site home page Giter Site logo

dockerize-wms's Introduction

WMS With Docker-Compose


Services

  • wms-db

    • mysql:5.7
    • environment
      • root password
      • db name
  • wms-backend

    • dapetin dockerfile image dari ./wms-backend
    • connect ke wms-db pake host wms-db
    • dockerignore node_modules (kalo ga diignore bakalan error di mysql nya)
  • wms-frontend

    • dockerfile dari ./wms-frontend
    • ada 3 stage di imagenya
      • develop-stage (tambahin command yarn serve di docker-compose nya)
      • build-stage (cuma buat nge build)
      • production-stage (copy hasil build dari build-stage, trus masukin ke directory nginx)
    • kalo mau ubah ke develop-stage, ubah aja value di build.target di dalem docker-compose, trus tambahin dibawahnya command: /bin/sh/ -c "yarn serve"
    • port nginx 80 tapi di docker-compose yg diekspos port 8080

docker-compose otomatis nge buat docker network, yang mana isinya nanti adalah ke tiga service diatas, makanya yg saya akses di db host backend nya tu nama service nya.

how to run

  1. masuk ke root folder project ni.
  2. jalanin command:
$ docker-compose up --force-recreate
  1. masuk ke shell wms-backend, trus jalanin command buat migrate db
# masuk ke shell
$ docker-compose exec wms-backend /bin/sh
# ini udah masuk
$ yarn sequelize-cli db:migrate
# jalanin seed
$ yarn sequelize-cli db:seed:all
  1. buka http://localhost:8080 di browser.
  2. login

Problems (solved)

  1. node_modules di wms-backend lupa diignore jadinya mysql nya error dan backend nya langsung stop
Aborted connection 5 to db: 'simplewms' user: 'root' host: '172.21.0.4' (Got an error reading communication packets)

dockerize-wms's People

Contributors

taufikrahadi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.