diff --git a/.dockerignore b/.dockerignore index 0e701eb..2e7f622 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,2 @@ -postgresql +.postgresql .env diff --git a/.env.dist b/.env.dist index 085e9bb..73d1679 100644 --- a/.env.dist +++ b/.env.dist @@ -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 diff --git a/.gitignore b/.gitignore index f2dd110..72abbee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # custom -postgresql +.postgresql .env # compiled output diff --git a/README.md b/README.md index 0e7afe9..c4a4768 100644 --- a/README.md +++ b/README.md @@ -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 : diff --git a/docker-compose.yml b/docker-compose.yml index b0a7d50..0de03d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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