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

From wikieduonline
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
https://hub.docker.com/_/postgres?tab=description
 
https://hub.docker.com/_/postgres?tab=description
  
== Basic example ==
+
== 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 ==
 
  
 
<pre>
 
<pre>
Line 42: Line 23:
 
       - 8080:8080
 
       - 8080:8080
 
</pre>
 
</pre>
 +
 +
== Activities ==
 +
* Add a docker-compose for PostgreSQL with a [[volume]] or [[Bind mounts (Docker)|bind mounts]]
  
 
== See also ==
 
== See also ==

Latest revision as of 08:00, 7 June 2022

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

Example[edit]

# 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[edit]

See also[edit]

Advertising: