Postgres:
Pinned a version so that watchdog does not upgrade versions. Made the host directory configurable
This commit is contained in:
1 parent
b877098a01
commit
ddf6b5a54c
2 files changed
+10
-3
No files matched your search
@@ -14,6 +14,12 @@
|
|||||||
source: pull
|
source: pull
|
||||||
force_source: yes
|
force_source: yes
|
||||||
|
|
||||||
|
- name: Ensure Nextcloud Directory exists
|
||||||
|
file:
|
||||||
|
path: "/var/lib/{{ host_directory }}"
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: Create postgres container
|
- name: Create postgres container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: "{{ postgres_name }}"
|
name: "{{ postgres_name }}"
|
||||||
@@ -24,8 +30,8 @@
|
|||||||
POSTGRES_USER: "{{ pg_user }}"
|
POSTGRES_USER: "{{ pg_user }}"
|
||||||
POSTGRES_PASSWORD: "{{ pg_password }}"
|
POSTGRES_PASSWORD: "{{ pg_password }}"
|
||||||
POSTGRES_DB: 'postgres'
|
POSTGRES_DB: 'postgres'
|
||||||
PGDATA: '/var/lib/postgresql/data/pgdata'
|
PGDATA: "{{ data_location }}/pgdata"
|
||||||
published_ports:
|
published_ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
volumes:
|
volumes:
|
||||||
- /var/lib/postgresql/data:/var/lib/postgresql/data
|
- "/var/lib/{{ host_directory }}/data:{{ data_location }}"
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
postgres_name: postgres
|
postgres_name: postgres
|
||||||
postgres_image: postgres:alpine
|
postgres_image: postgres:16-alpine
|
||||||
pg_user: postgres
|
pg_user: postgres
|
||||||
pg_password: '123456'
|
pg_password: '123456'
|
||||||
data_location: /var/lib/postgresql/data
|
data_location: /var/lib/postgresql/data
|
||||||
|
|
||||||
|
host_directory: postgresql
|
||||||
Reference in new issue
Block a user