Merge pull request #55 from Gabisonfire/critical-security-enhancements

Critical security enhancements
This commit is contained in:
iPromKnight
2024-02-04 16:04:42 +00:00
committed by GitHub
2 changed files with 20 additions and 16 deletions

View File

@@ -29,8 +29,6 @@ services:
postgres-exporter: postgres-exporter:
image: prometheuscommunity/postgres-exporter image: prometheuscommunity/postgres-exporter
ports:
- "9187:9187"
environment: environment:
DATA_SOURCE_NAME: "postgresql://postgres:postgres@postgres:5432/knightcrawler?sslmode=disable" DATA_SOURCE_NAME: "postgresql://postgres:postgres@postgres:5432/knightcrawler?sslmode=disable"
networks: networks:

View File

@@ -1,8 +1,7 @@
version: '3.8' version: "3.8"
name: knightcrawler name: knightcrawler
x-restart: &restart-policy x-restart: &restart-policy "unless-stopped"
"unless-stopped"
x-basehealth: &base-health x-basehealth: &base-health
interval: 10s interval: 10s
@@ -15,7 +14,7 @@ x-rabbithealth: &rabbitmq-health
<<: *base-health <<: *base-health
x-mongohealth: &mongodb-health x-mongohealth: &mongodb-health
test: ["CMD","mongosh", "--eval", "db.adminCommand('ping')"] test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
<<: *base-health <<: *base-health
x-postgreshealth: &postgresdb-health x-postgreshealth: &postgresdb-health
@@ -39,8 +38,11 @@ services:
- .env - .env
environment: environment:
PGUSER: postgres # needed for healthcheck. PGUSER: postgres # needed for healthcheck.
ports: # # If you need the database to be accessible from outside, please open the below port.
- "5432:5432" # # Furthermore, please, please, please, change the username and password in the .env file.
# # If you want to enhance your security even more, create a new user for the database with a strong password.
# ports:
# - "5432:5432"
volumes: volumes:
- postgres:/var/lib/postgresql/data - postgres:/var/lib/postgresql/data
healthcheck: *postgresdb-health healthcheck: *postgresdb-health
@@ -52,8 +54,10 @@ services:
image: mongo:latest image: mongo:latest
env_file: env_file:
- .env - .env
ports: # # If you need the database to be accessible from outside, please open the below port.
- "27017:27017" # # Furthermore, please, please, please, change the username and password in the .env file.
# ports:
# - "27017:27017"
volumes: volumes:
- mongo:/data/db - mongo:/data/db
restart: *restart-policy restart: *restart-policy
@@ -63,10 +67,12 @@ services:
rabbitmq: rabbitmq:
image: rabbitmq:3-management image: rabbitmq:3-management
ports: # # If you need the database to be accessible from outside, please open the below port.
- "5672:5672" # # Furthermore, please, please, please, look at the documentation for rabbit on how to secure the service.
- "15672:15672" # ports:
- "15692:15692" # - "5672:5672"
# - "15672:15672"
# - "15692:15692"
volumes: volumes:
- rabbitmq:/var/lib/rabbitmq - rabbitmq:/var/lib/rabbitmq
restart: *restart-policy restart: *restart-policy