Added Podman secret and Podman postgres container
This commit is contained in:
@@ -85,6 +85,10 @@
|
|||||||
containers.podman.podman_image:
|
containers.podman.podman_image:
|
||||||
name: nextcloud/all-in-one
|
name: nextcloud/all-in-one
|
||||||
tag: latest
|
tag: latest
|
||||||
|
- name: Ensure possession of Postgres container image
|
||||||
|
containers.podman.podman_image:
|
||||||
|
name: postgres
|
||||||
|
tag: 14.17
|
||||||
- name: Ensure possession of Gitea container image
|
- name: Ensure possession of Gitea container image
|
||||||
containers.podman.podman_image:
|
containers.podman.podman_image:
|
||||||
name: gitea/gitea
|
name: gitea/gitea
|
||||||
@@ -95,6 +99,11 @@
|
|||||||
- name: Ensure existence of shared network for Nextcloud, Gitea et al
|
- name: Ensure existence of shared network for Nextcloud, Gitea et al
|
||||||
containers.podman.podman_network:
|
containers.podman.podman_network:
|
||||||
name: sharenet
|
name: sharenet
|
||||||
|
- name: Create secret for PostgreSQL database container
|
||||||
|
containers.podman.podman_secret: # @TODO: Look into other Postgres authentication methods
|
||||||
|
name: postgres_pass
|
||||||
|
data: "admin" # @TODO: Replace value with Ansible variable
|
||||||
|
state: present
|
||||||
- name: Ensure containers are running with appropriate configuration
|
- name: Ensure containers are running with appropriate configuration
|
||||||
containers.podman.podman_containers:
|
containers.podman.podman_containers:
|
||||||
containers:
|
containers:
|
||||||
@@ -157,11 +166,18 @@
|
|||||||
- "sharenet"
|
- "sharenet"
|
||||||
requires:
|
requires:
|
||||||
- "db"
|
- "db"
|
||||||
# @TODO: Finish writing up the below
|
# @NOTE: Postgres (below) default port is 5432
|
||||||
- name: db
|
- name: db
|
||||||
state: present
|
state: present
|
||||||
restart_policy: on-failure:5
|
restart_policy: on-failure:5
|
||||||
image: postgres
|
image: postgres
|
||||||
|
# shm_size: 128mb # @TODO: Specify share of memory for container
|
||||||
|
volumes:
|
||||||
|
- "~/.config/postgres:/etc/postgresql"
|
||||||
network:
|
network:
|
||||||
- "caddynet"
|
- "caddynet"
|
||||||
- "sharenet"
|
- "sharenet"
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: senpai
|
||||||
|
POSTGRES_DB: mem
|
||||||
|
POSTGRESS_PASSWORD_FILE: /run/secrets/postgres_pass # @TODO: Look into other Postgres authentication methods
|
||||||
|
Reference in New Issue
Block a user