Skip to content

db_postgres

yml
version: '3.3'
services:
  db:
    image: postgres:13-alpine
    restart: always
    environment:
      - TZ=Asia/Shanghai
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD={YOUR_PGRST_PASSWORD}
    ports:
      - '127.0.0.1:5432:5432'
    volumes: 
      - db:/var/lib/postgresql/data
      # - ./db/init.sql:/docker-entrypoint-initdb.d/create_tables.sql
    shm_size: 512mb
    network_mode: bridge
volumes:
  db:
    driver: local

Released under the MIT License.