Difference between revisions of "Docker-compose.yml PostgreSQL"

From wikieduonline
Jump to navigation Jump to search
Line 44: Line 44:
  
 
== Activities ==
 
== Activities ==
* Add a docker-compose for PostgreSQL with a [[volume]] or [[mount point]]
+
* Add a docker-compose for PostgreSQL with a [[volume]] or [[Bind mounts (Docker)|bind mounts]]
  
 
== See also ==
 
== See also ==

Revision as of 10:21, 27 June 2020

https://hub.docker.com/_/postgres?tab=description

Basic example

# Use postgres/example user/password credentials
version: '3.1'

services:

 db:
   image: postgres
   restart: always
   environment:
     POSTGRES_PASSWORD: example

 adminer:
   image: adminer
   restart: always
   ports:
     - 8080:8080

Advanced example

# Use postgres/example user/password credentials
version: '3.1'

services:

  db:
    image: postgres
    restart: always
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: example

  adminer:
    image: adminer
    restart: always
    ports:
      - 8080:8080

Activities

See also

Advertising: