remove pgadmin

This commit is contained in:
Gsk54 2022-12-26 09:45:20 +01:00
parent b1c6ae69af
commit 4f050405ec
5 changed files with 6 additions and 38 deletions

View File

@ -1,2 +1,2 @@
postgresql
.postgresql
.env

View File

@ -15,11 +15,4 @@ POSTGRES_IMAGE=postgres:15.0
POSTGRES_DB=user
POSTGRES_PASSWORD=user
POSTGRES_USER=user
POSTGRES_PORT=5401
# PGADMIN
PGADMIN_CONTAINER=v3-user-pgadmin
PGADMIN_IMAGE=dpage/pgadmin4:6.12
PGADMIN_EMAIL=it@mobicoop.org
PGADMIN_PASSWORD=user
PGADMIN_PORT=8401
POSTGRES_PORT=5501

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
# custom
postgresql
.postgresql
.env
# compiled output

View File

@ -26,12 +26,6 @@ docker-compose up -d
The app runs automatically on the port defined in `SERVICE_PORT` of `.env` file (default : _5001_).
You then need to set the appropriate rights for PGAdmin container :
```bash
sudo chown -R 5050:5050 postgresql/.pgadmin_data
```
## Database migration
Before using the app, you need to launch the database migration :

View File

@ -24,40 +24,21 @@ services:
db:
container_name: ${POSTGRES_CONTAINER}
image: ${POSTGRES_IMAGE}
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT:-5401}:5432"
- "${POSTGRES_PORT:-5501}:5432"
volumes:
- ./postgresql/.db_data:/var/lib/postgresql/data:rw
- .postgresql:/var/lib/postgresql/data:rw
networks:
v3-network:
aliases:
- v3-user-db
pgadmin:
container_name: ${PGADMIN_CONTAINER}
image: ${PGADMIN_IMAGE}
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- "${PGADMIN_PORT:-8401}:80"
volumes:
- ./postgresql/.pgadmin_data:/var/lib/pgadmin:rw
restart: unless-stopped
networks:
v3-network:
aliases:
- v3-user-pgadmin
depends_on:
- db
networks:
v3-network:
name: v3-network
driver: bridge
external: true