Skip to content

Instantly share code, notes, and snippets.

@afwu
Forked from ThaddeusJiang/.gitignore
Created July 26, 2023 03:28
Show Gist options
  • Save afwu/b7697fc7ce3d3236714dc2f4c1b57766 to your computer and use it in GitHub Desktop.
Save afwu/b7697fc7ce3d3236714dc2f4c1b57766 to your computer and use it in GitHub Desktop.

Revisions

  1. @ThaddeusJiang ThaddeusJiang created this gist Jul 25, 2023.
    1 change: 1 addition & 0 deletions .gitignore
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    local/
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    使用 docker compose 启动 local db,并把数据存储在当前文件夹 ./local/data
    16 changes: 16 additions & 0 deletions docker-compose.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    version: '3.1'

    services:
    db:
    image: postgres:13.4
    restart: always
    ports:
    - 5432:5432
    environment:
    POSTGRES_USERNAME: postgres
    POSTGRES_PASSWORD: ***
    POSTGRES_DB: local
    volumes:
    - ./local/data/postgresql:/var/lib/postgresql/data
    networks:
    - default