\( \newcommand{\N}{\mathbb{N}} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\P}{\mathcal P} \newcommand{\B}{\mathcal B} \newcommand{\F}{\mathbb{F}} \newcommand{\E}{\mathcal E} \newcommand{\brac}[1]{\left(#1\right)} \newcommand{\abs}[1]{\left|#1\right|} \newcommand{\matrixx}[1]{\begin{bmatrix}#1\end {bmatrix}} \newcommand{\vmatrixx}[1]{\begin{vmatrix} #1\end{vmatrix}} \newcommand{\lims}{\mathop{\overline{\lim}}} \newcommand{\limi}{\mathop{\underline{\lim}}} \newcommand{\limn}{\lim_{n\to\infty}} \newcommand{\limsn}{\lims_{n\to\infty}} \newcommand{\limin}{\limi_{n\to\infty}} \newcommand{\nul}{\mathop{\mathrm{Nul}}} \newcommand{\col}{\mathop{\mathrm{Col}}} \newcommand{\rank}{\mathop{\mathrm{Rank}}} \newcommand{\dis}{\displaystyle} \newcommand{\spann}{\mathop{\mathrm{span}}} \newcommand{\range}{\mathop{\mathrm{range}}} \newcommand{\inner}[1]{\langle #1 \rangle} \newcommand{\innerr}[1]{\left\langle #1 \right \rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\toto}{\rightrightarrows} \newcommand{\upto}{\nearrow} \newcommand{\downto}{\searrow} \newcommand{\qed}{\quad \blacksquare} \newcommand{\tr}{\mathop{\mathrm{tr}}} \newcommand{\bm}{\boldsymbol} \newcommand{\cupp}{\bigcup} \newcommand{\capp}{\bigcap} \newcommand{\sqcupp}{\bigsqcup} \newcommand{\re}{\mathop{\mathrm{Re}}} \newcommand{\im}{\mathop{\mathrm{Im}}} \newcommand{\comma}{\text{,}} \newcommand{\foot}{\text{。}} \)

Tuesday, July 21, 2020

basic setup for hibernate

For hiberante.cfg.xml:

    
        update
        
        com.mysql.cj.jdbc.Driver
        jdbc:mysql://192.168.99.100:3306/JDBC_test?useSSL=false
        root
        cclee12345@12345

        
        1

        
        org.hibernate.dialect.MySQL55Dialect

        
        true

  
  thread
        create-drop

        
    

and pom.xml we need:

  mysql
  mysql-connector-java
  8.0.20

in additional to the hibernate maven dependencies.

Wednesday, July 1, 2020

Record for my Docker Files

FROM node:10

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install && npm rebuild bcrypt --build-from-source

EXPOSE 3000

CMD ["npm", "start"]
and
version: "3.7"

services:
  db:
    container_name: postgres_screencapdic_db
    image: postgres
    restart: always
    environment:
      POSTGRES_USER: cclee11111
      POSTGRES_PASSWORD: cclee11111
      POSTGRES_DB: screencapdb
    volumes:
      - screencapdb:/var/lib/postgresql/data
    ports:
      - "5432:5432"
  # screencap_api:
  #   build:
  #     context: ./
  #     dockerfile: Dockerfile-screepcap-express
  #   container_name: screencap_api
  #   restart: always
  #   ports:
  #     - "8080:3000"
  #   volumes:
  #     - type: bind
  #       source: ./
  #       target: /usr/src/app
  #     - /usr/src/app/node_modules

volumes:
  screencapdb: