feat: postgres central db
This commit is contained in:
parent
891c883713
commit
4153fc8f89
5 changed files with 59 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
3
servers/apoc/docker-compose.d/custom/pgadmin/Dockerfile
Normal file
3
servers/apoc/docker-compose.d/custom/pgadmin/Dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM dpage/pgadmin4
|
||||
|
||||
COPY servers.json /pgadmin4/servers.json
|
13
servers/apoc/docker-compose.d/custom/pgadmin/servers.json
Normal file
13
servers/apoc/docker-compose.d/custom/pgadmin/servers.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"Servers": {
|
||||
"1": {
|
||||
"Name": "IXVD Central Database",
|
||||
"Group": "IXVD Databases",
|
||||
"Port": 5432,
|
||||
"Username": "postgres",
|
||||
"Host": "postgres",
|
||||
"SSLMode": "prefer",
|
||||
"MaintenanceDB": "postgres"
|
||||
}
|
||||
}
|
||||
}
|
26
servers/apoc/docker-compose.d/docker-compose.database.yml
Normal file
26
servers/apoc/docker-compose.d/docker-compose.database.yml
Normal 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
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue