1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00
dockerfiles/postgres
2021-10-27 12:07:38 +08:00
..
arm update postgres 2021-08-24 14:53:36 +08:00
docker-compose.yml add commento 2021-10-27 12:07:38 +08:00
README.md update 2020-10-22 14:41:34 +08:00

postgres

docker-compose.yml

postgres:
  image: postgres:alpine
  ports:
    - "5432:5432"
  volumes:
    - ./data:/var/lib/postgresql/data
  environment:
    - POSTGRES_USER=postgres
    - POSTGRES_PASSWORD=postgres
    - POSTGRES_DB=postgres
  restart: unless-stopped

up and running

$ docker-compose up -d

$ docker-compose exec postgres psql -U postgres postgres
>>> SELECT CURRENT_TIMESTAMP;
              now
-------------------------------
 2016-12-07 01:44:29.872928+00
(1 row)

>>> \?
>>> \d
>>> \q