This commit is contained in:
@@ -14,16 +14,26 @@ services:
|
||||
depends_on:
|
||||
- db
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- catlink-network
|
||||
|
||||
db:
|
||||
image: postgres:14
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data/
|
||||
- ./database/postgresql.conf:/etc/postgresql/postgresql.conf
|
||||
- ./database/pg_hba.conf:/etc/postgresql/pg_hba.conf
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5432:5432"
|
||||
# Убираем внешний порт для безопасности - доступ только внутри Docker сети
|
||||
# ports:
|
||||
# - "5432:5432"
|
||||
networks:
|
||||
- catlink-network
|
||||
command: postgres -c config_file=/etc/postgresql/postgresql.conf -c hba_file=/etc/postgresql/pg_hba.conf
|
||||
|
||||
frontend:
|
||||
build: ./frontend/linktree-frontend
|
||||
@@ -34,6 +44,16 @@ services:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- web
|
||||
networks:
|
||||
- catlink-network
|
||||
|
||||
# Создаем изолированную сеть для безопасности
|
||||
networks:
|
||||
catlink-network:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.20.0.0/16
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user