mirror of
https://gitee.com/kennylee/docker.git
synced 2024-12-02 11:58:15 +08:00
20 lines
508 B
YAML
20 lines
508 B
YAML
|
version: '3'
|
||
|
|
||
|
services:
|
||
|
postgresql:
|
||
|
image: registry.cn-hangzhou.aliyuncs.com/kennylee/postgresql
|
||
|
restart: always
|
||
|
expose:
|
||
|
- '5432'
|
||
|
environment:
|
||
|
- POSTGRES_USER=example
|
||
|
- POSTGRES_PASSWORD=example
|
||
|
- POSTGRES_DB=my_db
|
||
|
volumes:
|
||
|
- ./data/postgresql:/var/lib/postgresql/data:rw
|
||
|
logging:
|
||
|
driver: 'json-file'
|
||
|
options:
|
||
|
max-size: '30m'
|
||
|
max-file: '1'
|