mirror of
https://github.com/akpall/akpella.git
synced 2026-02-21 00:26:59 +00:00
docker-postgresql: added
This commit is contained in:
@@ -15,6 +15,7 @@ storage:
|
|||||||
- path: /home/core/caddy/var/www/html
|
- path: /home/core/caddy/var/www/html
|
||||||
- path: /home/core/matrixdotorg-synapse/data
|
- path: /home/core/matrixdotorg-synapse/data
|
||||||
- path: /home/core/matrixdotorg-matrix-appservice-irc/data
|
- path: /home/core/matrixdotorg-matrix-appservice-irc/data
|
||||||
|
- path: /home/core/postgresql
|
||||||
files:
|
files:
|
||||||
# /etc/hostname
|
# /etc/hostname
|
||||||
- path: /etc/hostname
|
- path: /etc/hostname
|
||||||
@@ -63,6 +64,10 @@ systemd:
|
|||||||
- name: generate-secrets.service
|
- name: generate-secrets.service
|
||||||
enabled: true
|
enabled: true
|
||||||
contents_local: generate-secrets.service
|
contents_local: generate-secrets.service
|
||||||
|
# docker-postgresql.service
|
||||||
|
- name: docker-postgresql.service
|
||||||
|
enabled: true
|
||||||
|
contents_local: docker-postgresql.service
|
||||||
# docker.service
|
# docker.service
|
||||||
- name: docker.service
|
- name: docker.service
|
||||||
dropins:
|
dropins:
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Create docker network: caddy-network
|
Description=Create docker networks
|
||||||
After=docker.service
|
After=docker.service
|
||||||
Requires=docker.service
|
Requires=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
|
||||||
ExecStart=/usr/bin/docker network create caddy-network
|
ExecStart=/usr/bin/docker network create caddy-network
|
||||||
|
ExecStart=/usr/bin/docker network create postgresql-network
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
16
files/docker-postgresql.service
Normal file
16
files/docker-postgresql.service
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=The PostgreSQL object-relational database system provides reliability and data integrity.
|
||||||
|
After=docker.service
|
||||||
|
Requires=docker.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
EnvironmentFile=/home/core/postgresql/secret
|
||||||
|
ExecStart=docker run \
|
||||||
|
--network=postgresql-network \
|
||||||
|
--name=postgresql \
|
||||||
|
--rm \
|
||||||
|
-e POSTGRES_PASSWORD=${POSTGRES_PASSWORD} \
|
||||||
|
postgres:latest
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Reference in New Issue
Block a user