add pgadmin
This commit is contained in:
5
.env
5
.env
@@ -1,3 +1,6 @@
|
||||
POSTGRES_USER=myuser
|
||||
POSTGRES_PASSWORD=mypassword
|
||||
POSTGRES_DB=mydb
|
||||
POSTGRES_DB=mydb
|
||||
PGADMIN_DEFAULT_PASSWORD=qwerty
|
||||
PGADMIN_PORT=8085
|
||||
WEB_PORT=8080
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
pgadmin
|
||||
.idea
|
||||
postgres_data
|
||||
# ---> Python
|
||||
|
||||
@@ -3,8 +3,8 @@ services:
|
||||
image: postgres:15-alpine
|
||||
env_file:
|
||||
- ./.env
|
||||
ports:
|
||||
- "5432:5432"
|
||||
# ports:
|
||||
# - "5432:5432"
|
||||
volumes:
|
||||
- ./postgres_data:/var/lib/postgresql/data
|
||||
container_name: postgres_db
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
start_period: 80s
|
||||
web:
|
||||
ports:
|
||||
- "80:8086"
|
||||
- ${WEB_PORT:-5050}:8086
|
||||
build:
|
||||
context: ./src
|
||||
env_file:
|
||||
@@ -25,4 +25,19 @@ services:
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
restart: always
|
||||
restart: always
|
||||
|
||||
pgadmin:
|
||||
container_name: pgadmin_container
|
||||
image: dpage/pgadmin4:6.19
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin@example.com}
|
||||
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
|
||||
PGADMIN_CONFIG_SERVER_MODE: 'False'
|
||||
volumes:
|
||||
- ./pgadmin:/var/lib/pgadmin
|
||||
ports:
|
||||
- ${PGADMIN_PORT:-5050}:80
|
||||
Reference in New Issue
Block a user