From 3b31d590b88fdab680bc2d97aee26c181083366d Mon Sep 17 00:00:00 2001 From: Christian Lempa Date: Mon, 11 Dec 2023 14:57:49 +0100 Subject: [PATCH] updated postgres and mariadb compose --- docker-compose/mariadb/docker-compose.yaml | 2 +- docker-compose/postgres/docker-compose.yaml | 24 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 docker-compose/postgres/docker-compose.yaml diff --git a/docker-compose/mariadb/docker-compose.yaml b/docker-compose/mariadb/docker-compose.yaml index 979bdcd..88591be 100644 --- a/docker-compose/mariadb/docker-compose.yaml +++ b/docker-compose/mariadb/docker-compose.yaml @@ -7,7 +7,7 @@ volumes: mariadb-data: services: mariadb: - container_name: mariadb:11.1.2 + # (Recommended) replace "latest" with specific version image: mariadb:latest # (Optional) remove this section when you don't want to expose ports: diff --git a/docker-compose/postgres/docker-compose.yaml b/docker-compose/postgres/docker-compose.yaml new file mode 100644 index 0000000..3a6d70e --- /dev/null +++ b/docker-compose/postgres/docker-compose.yaml @@ -0,0 +1,24 @@ +--- +# (Optional) when using custom network +# networks: +# yournetwork: +# external: true +volumes: + postgres-data: +services: + postgres: + # (Recommended) replace "latest" with specific version + image: postgres:latest + environment: + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + # (Optional) when creating a new database + # - POSTGRES_DB=${POSTGRES_DB} + ports: + - 5432:5432 + # (Optional) when using custom network + # networks: + # - yournetwork + volumes: + - postgres-data:/var/lib/postgresql/data + restart: unless-stopped