add pgadmin
This commit is contained in:
5
.env
5
.env
@@ -1,3 +1,6 @@
|
|||||||
POSTGRES_USER=myuser
|
POSTGRES_USER=myuser
|
||||||
POSTGRES_PASSWORD=mypassword
|
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
|
.idea
|
||||||
postgres_data
|
postgres_data
|
||||||
# ---> Python
|
# ---> Python
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ services:
|
|||||||
image: postgres:15-alpine
|
image: postgres:15-alpine
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
ports:
|
# ports:
|
||||||
- "5432:5432"
|
# - "5432:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- ./postgres_data:/var/lib/postgresql/data
|
- ./postgres_data:/var/lib/postgresql/data
|
||||||
container_name: postgres_db
|
container_name: postgres_db
|
||||||
@@ -17,7 +17,7 @@ services:
|
|||||||
start_period: 80s
|
start_period: 80s
|
||||||
web:
|
web:
|
||||||
ports:
|
ports:
|
||||||
- "80:8086"
|
- ${WEB_PORT:-5050}:8086
|
||||||
build:
|
build:
|
||||||
context: ./src
|
context: ./src
|
||||||
env_file:
|
env_file:
|
||||||
@@ -25,4 +25,19 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
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