feat: postgres central db

This commit is contained in:
Strix 2023-12-14 22:03:53 +01:00
parent 891c883713
commit 4153fc8f89
No known key found for this signature in database
GPG key ID: 5F35B3B8537287A7
5 changed files with 59 additions and 1 deletions

View file

@ -0,0 +1,16 @@
server {
listen 80;
server_name pg.ixvd.net;
# SSL is managed by certbot, no need for a ssl listen; it will be generated automagically!
# default html page
location / {
proxy_pass http://pgadmin;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View file

@ -0,0 +1,3 @@
FROM dpage/pgadmin4
COPY servers.json /pgadmin4/servers.json

View file

@ -0,0 +1,13 @@
{
"Servers": {
"1": {
"Name": "IXVD Central Database",
"Group": "IXVD Databases",
"Port": 5432,
"Username": "postgres",
"Host": "postgres",
"SSLMode": "prefer",
"MaintenanceDB": "postgres"
}
}
}

View file

@ -0,0 +1,26 @@
version: '2.2'
services:
postgres:
image: postgres:15
container_name: postgres
restart: always
ports:
- "5432:5432"
env_file:
- /etc/ixvd/secrets/env/postgres.env
volumes:
- /srv/postgres/data:/var/lib/postgresql/data
networks:
- internal
pgadmin:
build: custom/pgadmin
volumes:
- /srv/pgadmin/data:/var/lib/pgadmin
env_file:
- /etc/ixvd/secrets/env/pgadmin.env
networks:
- proxy
- internal

View file

@ -7,7 +7,7 @@ services:
build: custom/nginx
environment:
CERTBOT_EMAIL: "webmaster@ixvd.net"
CERTBOT_DOMAINS: "apoc.ixvd.net,mail.ixvd.net,git.ixvd.net,my.ixvd.net,ci.ixvd.net,baikal.ixvd.net"
CERTBOT_DOMAINS: "apoc.ixvd.net,mail.ixvd.net,git.ixvd.net,my.ixvd.net,ci.ixvd.net,baikal.ixvd.net,pg.ixvd.net"
volumes:
- /srv/certbot/data:/etc/letsencrypt
- /srv/certbot/other/www:/var/www/certbot