1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-21 01:27:01 +02:00
dockerfiles/postgres
2024-05-24 15:27:39 +08:00
..
arm
docker-compose.yml add kestra 2024-05-24 15:27:39 +08:00
README.md

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