ZhangZhihui's Blog  

Docker compose file:

services:
  postgres:
    image: postgres:16-alpine
    environment:
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=aaa
      - POSTGRES_DB=zimple_bank

 

The above environmet variables are necessary. WIthout them, the container can't be initialized successfully. With them, a database named zimple_bank will be automatically created when the container is created.

posted on 2023-12-10 17:17  ZhangZhihuiAAA  阅读(8)  评论(0编辑  收藏  举报