install pgadmin

This commit is contained in:
Daniel afx 2022-02-06 03:18:30 +02:00
parent 2abf8c7e75
commit f480d85560
5 changed files with 31 additions and 15 deletions

View file

@ -9,15 +9,16 @@ SQL_HOST=db
SQL_PORT=5432
DATABASE=postgres
DATABASE_URL=postgresql://forest:forest123@db:5432/forest_prod
POSTGRES_USER=forest
POSTGRES_PASSWORD=forest123
POSTGRES_DB=forest_prod
DATABASE_URL=postgresql://forest:forest123@db:5432/forest_prod
PGADMIN_DEFAULT_EMAIL: daniel@deflax.net
PGADMIN_DEFAULT_PASSWORD: Kasd18913Sx
PGADMIN_CONFIG_SERVER_MODE: 'False'
MAIL_ADMIN=daniel@deflax.net
MAIL_SUBJECT_PREFIX=ForestNet
MAIL_SERVER=smtp.gmail.com
MAIL_USERNAME=admin@gmail.com
MAIL_PASSWORD=kur

5
.gitignore vendored
View file

@ -21,11 +21,12 @@ logs/certbot/*
# ignore generated certificates for haproxy
data/certificates/*
# ignore flask postgresql volume
# ignore postgresql volumes
data/db/*
!data/db/.placeholder
data/dbadmin/*
!data/dbadmin/.placeholder
# ignore osmtile postgresql volume
data/osmtile/*
!data/osmtile/.placeholder

View file

View file

@ -33,6 +33,26 @@ services:
- meta.role=certbot
#entrypoint: sh -c 'while true; do sleep 1; done'
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 15d & wait $${!}; done;'"
db:
image: postgres:13-alpine
volumes:
- "./data/db/pgdata:/var/lib/postgresql/data/"
env_file:
- ./.env.prod
restart: always
networks:
- internal
pgadmin:
image: dpage/pgadmin4
volumes:
- "./data/dbadmin:/var/lib/pgadmin"
env_file:
- ./.env.prod
restart: always
networks:
- internal
depends_on:
- db
flask:
build:
context: ./flask
@ -46,14 +66,6 @@ services:
- internal
depends_on:
- db
db:
image: postgres:13-alpine
volumes:
- "./data/db/pgdata:/var/lib/postgresql/data/"
env_file:
- ./.env.prod
networks:
- internal
osmtile:
image: "overv/openstreetmap-tile-server:latest"
hostname: osmtile

View file

@ -70,7 +70,9 @@ backend forest.deflax.net
# server list
server s1 flask:5000 check
backend db.forest.deflax.net
server s1 pgadmin:80 check
#backend docs.deflax.net
# # server list
# server s1 swagger:80 check
# server s1 swagger:80 check