docker: prevent ports being exposed outside container context (#3351)

This commit is contained in:
Oliver 2022-07-18 14:08:33 +10:00 committed by GitHub
parent 7549d033df
commit f23cef0400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -22,7 +22,7 @@ services:
inventree-dev-db:
container_name: inventree-dev-db
image: postgres:13
ports:
expose:
- ${INVENTREE_DB_PORT:-5432}/tcp
environment:
- PGDATA=/var/lib/postgresql/data/dev/pgdb

View File

@ -45,7 +45,7 @@ services:
inventree-db:
container_name: inventree-db
image: postgres:13
ports:
expose:
- ${INVENTREE_DB_PORT:-5432}/tcp
environment:
- PGDATA=/var/lib/postgresql/data/pgdb
@ -65,9 +65,9 @@ services:
- inventree-db
env_file:
- .env
ports:
- ${INVENTREE_CACHE_PORT:-6379}:6379
restart: unless-stopped
expose:
- ${INVENTREE_CACHE_PORT:-6379}
restart: always
# InvenTree web server services
# Uses gunicorn as the web server
@ -126,7 +126,6 @@ services:
restart: unless-stopped
volumes:
# NOTE: Change /path/to/data to a directory on your local machine
# Persistent data, stored external to the container(s)
inventree_data:
driver: local