Skip to content

Instantly share code, notes, and snippets.

@k1-c
Last active February 15, 2023 06:10
Show Gist options
  • Select an option

  • Save k1-c/825e8f76683539136fc7acd15b1cc619 to your computer and use it in GitHub Desktop.

Select an option

Save k1-c/825e8f76683539136fc7acd15b1cc619 to your computer and use it in GitHub Desktop.
[docker-compose] PostgresSQL Quick Start
version: "3.8"
volumes:
db-store:
services:
db:
image: postgres:11-alpine
ports:
- target: 5432
published: ${DB_PORT:-5432}
protocol: tcp
mode: host
volumes:
- type: volume
source: db-store
target: /var/lib/psql
volume:
nocopy: true
container_name: {{ project-name }}.db
environment:
- POSTGRES_DB=${DB_NAME:-dev}
- POSTGRES_USER=${DB_USER:-postgres}
- POSTGRES_PASSWORD=${DB_PASS:-postgres}
- TZ=Asia/Tokyo
- PGTZ=Asia/Tokyo
- LANG=ja_JP.utf8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment